From 9bda7e25b420279a621cbf3b65b084f924907965 Mon Sep 17 00:00:00 2001 From: Ilya Raykker Date: Tue, 8 Oct 2024 18:29:18 +0200 Subject: [PATCH] Update protobufs and remove unused queries --- .../cosmos/circuit/module/v1/module.pb.ts | 8 - .../cosmos/circuit/v1/query.pb.ts | 44 - src/grpc_gateway/cosmos/circuit/v1/tx.pb.ts | 47 - .../cosmos/circuit/v1/types.pb.ts | 27 - .../cosmos/group/module/v1/module.pb.ts | 11 - src/grpc_gateway/cosmos/group/v1/events.pb.ts | 51 - .../cosmos/group/v1/genesis.pb.ts | 17 - src/grpc_gateway/cosmos/group/v1/query.pb.ts | 183 -- src/grpc_gateway/cosmos/group/v1/tx.pb.ts | 198 -- src/grpc_gateway/cosmos/group/v1/types.pb.ts | 117 - .../cosmos/nft/module/v1/module.pb.ts | 7 - .../cosmos/nft/v1beta1/event.pb.ts | 23 - .../cosmos/nft/v1beta1/genesis.pb.ts | 16 - src/grpc_gateway/cosmos/nft/v1beta1/nft.pb.ts | 24 - .../cosmos/nft/v1beta1/query.pb.ts | 95 - src/grpc_gateway/cosmos/nft/v1beta1/tx.pb.ts | 22 - .../ibc/lightclients/wasm/v1/genesis.pb.ts | 12 - .../ibc/lightclients/wasm/v1/query.pb.ts | 33 - .../ibc/lightclients/wasm/v1/tx.pb.ts | 45 - .../ibc/lightclients/wasm/v1/wasm.pb.ts | 24 - src/protobuf/amino/amino.ts | 2 +- .../cosmos/app/runtime/v1alpha1/module.ts | 2 +- src/protobuf/cosmos/app/v1alpha1/config.ts | 2 +- src/protobuf/cosmos/app/v1alpha1/module.ts | 2 +- src/protobuf/cosmos/app/v1alpha1/query.ts | 2 +- src/protobuf/cosmos/auth/module/v1/module.ts | 2 +- src/protobuf/cosmos/auth/v1beta1/auth.ts | 2 +- src/protobuf/cosmos/auth/v1beta1/genesis.ts | 2 +- src/protobuf/cosmos/auth/v1beta1/query.ts | 2 +- src/protobuf/cosmos/auth/v1beta1/tx.ts | 2 +- src/protobuf/cosmos/authz/module/v1/module.ts | 2 +- src/protobuf/cosmos/authz/v1beta1/authz.ts | 2 +- src/protobuf/cosmos/authz/v1beta1/event.ts | 2 +- src/protobuf/cosmos/authz/v1beta1/genesis.ts | 2 +- src/protobuf/cosmos/authz/v1beta1/query.ts | 2 +- src/protobuf/cosmos/authz/v1beta1/tx.ts | 2 +- src/protobuf/cosmos/autocli/v1/options.ts | 2 +- src/protobuf/cosmos/autocli/v1/query.ts | 2 +- src/protobuf/cosmos/bank/module/v1/module.ts | 2 +- src/protobuf/cosmos/bank/v1beta1/authz.ts | 2 +- src/protobuf/cosmos/bank/v1beta1/bank.ts | 2 +- src/protobuf/cosmos/bank/v1beta1/genesis.ts | 2 +- src/protobuf/cosmos/bank/v1beta1/query.ts | 2 +- src/protobuf/cosmos/bank/v1beta1/tx.ts | 2 +- src/protobuf/cosmos/base/abci/v1beta1/abci.ts | 2 +- .../cosmos/base/node/v1beta1/query.ts | 2 +- .../cosmos/base/query/v1beta1/pagination.ts | 2 +- .../base/reflection/v1beta1/reflection.ts | 2 +- .../base/reflection/v2alpha1/reflection.ts | 2 +- .../cosmos/base/tendermint/v1beta1/query.ts | 2 +- .../cosmos/base/tendermint/v1beta1/types.ts | 2 +- src/protobuf/cosmos/base/v1beta1/coin.ts | 2 +- .../cosmos/circuit/module/v1/module.ts | 85 - src/protobuf/cosmos/circuit/v1/query.ts | 457 --- src/protobuf/cosmos/circuit/v1/tx.ts | 545 ---- src/protobuf/cosmos/circuit/v1/types.ts | 344 --- .../cosmos/consensus/module/v1/module.ts | 2 +- src/protobuf/cosmos/consensus/v1/query.ts | 2 +- src/protobuf/cosmos/consensus/v1/tx.ts | 2 +- .../cosmos/crisis/module/v1/module.ts | 2 +- src/protobuf/cosmos/crisis/v1beta1/genesis.ts | 2 +- src/protobuf/cosmos/crisis/v1beta1/tx.ts | 2 +- src/protobuf/cosmos/crypto/ed25519/keys.ts | 2 +- src/protobuf/cosmos/crypto/hd/v1/hd.ts | 2 +- .../cosmos/crypto/keyring/v1/record.ts | 2 +- src/protobuf/cosmos/crypto/multisig/keys.ts | 2 +- .../crypto/multisig/v1beta1/multisig.ts | 2 +- src/protobuf/cosmos/crypto/secp256k1/keys.ts | 2 +- src/protobuf/cosmos/crypto/secp256r1/keys.ts | 2 +- .../cosmos/distribution/module/v1/module.ts | 2 +- .../distribution/v1beta1/distribution.ts | 2 +- .../cosmos/distribution/v1beta1/genesis.ts | 2 +- .../cosmos/distribution/v1beta1/query.ts | 2 +- .../cosmos/distribution/v1beta1/tx.ts | 2 +- .../cosmos/evidence/module/v1/module.ts | 2 +- .../cosmos/evidence/v1beta1/evidence.ts | 2 +- .../cosmos/evidence/v1beta1/genesis.ts | 2 +- src/protobuf/cosmos/evidence/v1beta1/query.ts | 2 +- src/protobuf/cosmos/evidence/v1beta1/tx.ts | 2 +- .../cosmos/feegrant/module/v1/module.ts | 2 +- .../cosmos/feegrant/v1beta1/feegrant.ts | 2 +- .../cosmos/feegrant/v1beta1/genesis.ts | 2 +- src/protobuf/cosmos/feegrant/v1beta1/query.ts | 2 +- src/protobuf/cosmos/feegrant/v1beta1/tx.ts | 2 +- .../cosmos/genutil/module/v1/module.ts | 2 +- .../cosmos/genutil/v1beta1/genesis.ts | 2 +- src/protobuf/cosmos/gov/module/v1/module.ts | 2 +- src/protobuf/cosmos/gov/v1/genesis.ts | 2 +- src/protobuf/cosmos/gov/v1/gov.ts | 2 +- src/protobuf/cosmos/gov/v1/query.ts | 2 +- src/protobuf/cosmos/gov/v1/tx.ts | 2 +- src/protobuf/cosmos/gov/v1beta1/genesis.ts | 2 +- src/protobuf/cosmos/gov/v1beta1/gov.ts | 2 +- src/protobuf/cosmos/gov/v1beta1/query.ts | 2 +- src/protobuf/cosmos/gov/v1beta1/tx.ts | 2 +- src/protobuf/cosmos/group/module/v1/module.ts | 127 - src/protobuf/cosmos/group/v1/events.ts | 766 ----- src/protobuf/cosmos/group/v1/genesis.ts | 243 -- src/protobuf/cosmos/group/v1/query.ts | 2351 --------------- src/protobuf/cosmos/group/v1/tx.ts | 2544 ----------------- src/protobuf/cosmos/group/v1/types.ts | 1801 ------------ src/protobuf/cosmos/ics23/v1/proofs.ts | 2 +- src/protobuf/cosmos/mint/module/v1/module.ts | 2 +- src/protobuf/cosmos/mint/v1beta1/genesis.ts | 2 +- src/protobuf/cosmos/mint/v1beta1/mint.ts | 2 +- src/protobuf/cosmos/mint/v1beta1/query.ts | 2 +- src/protobuf/cosmos/mint/v1beta1/tx.ts | 2 +- src/protobuf/cosmos/msg/textual/v1/textual.ts | 2 +- src/protobuf/cosmos/msg/v1/msg.ts | 2 +- src/protobuf/cosmos/nft/module/v1/module.ts | 65 - src/protobuf/cosmos/nft/v1beta1/event.ts | 336 --- src/protobuf/cosmos/nft/v1beta1/genesis.ts | 187 -- src/protobuf/cosmos/nft/v1beta1/nft.ts | 323 --- src/protobuf/cosmos/nft/v1beta1/query.ts | 1138 -------- src/protobuf/cosmos/nft/v1beta1/tx.ts | 211 -- .../cosmos/orm/module/v1alpha1/module.ts | 2 +- .../cosmos/orm/query/v1alpha1/query.ts | 2 +- src/protobuf/cosmos/orm/v1/orm.ts | 2 +- src/protobuf/cosmos/orm/v1alpha1/schema.ts | 2 +- .../cosmos/params/module/v1/module.ts | 2 +- src/protobuf/cosmos/params/v1beta1/params.ts | 2 +- src/protobuf/cosmos/params/v1beta1/query.ts | 2 +- src/protobuf/cosmos/query/v1/query.ts | 2 +- .../cosmos/reflection/v1/reflection.ts | 2 +- .../cosmos/slashing/module/v1/module.ts | 2 +- .../cosmos/slashing/v1beta1/genesis.ts | 2 +- src/protobuf/cosmos/slashing/v1beta1/query.ts | 2 +- .../cosmos/slashing/v1beta1/slashing.ts | 2 +- src/protobuf/cosmos/slashing/v1beta1/tx.ts | 2 +- .../cosmos/staking/module/v1/module.ts | 2 +- src/protobuf/cosmos/staking/v1beta1/authz.ts | 2 +- .../cosmos/staking/v1beta1/genesis.ts | 2 +- src/protobuf/cosmos/staking/v1beta1/query.ts | 2 +- .../cosmos/staking/v1beta1/staking.ts | 2 +- src/protobuf/cosmos/staking/v1beta1/tx.ts | 2 +- .../cosmos/store/internal/kv/v1beta1/kv.ts | 2 +- .../cosmos/store/snapshots/v1/snapshot.ts | 2 +- .../cosmos/store/streaming/abci/grpc.ts | 2 +- .../cosmos/store/v1beta1/commit_info.ts | 2 +- .../cosmos/store/v1beta1/listening.ts | 2 +- src/protobuf/cosmos/tx/config/v1/config.ts | 2 +- .../cosmos/tx/signing/v1beta1/signing.ts | 2 +- src/protobuf/cosmos/tx/v1beta1/service.ts | 2 +- src/protobuf/cosmos/tx/v1beta1/tx.ts | 2 +- .../cosmos/upgrade/module/v1/module.ts | 2 +- src/protobuf/cosmos/upgrade/v1beta1/query.ts | 2 +- src/protobuf/cosmos/upgrade/v1beta1/tx.ts | 2 +- .../cosmos/upgrade/v1beta1/upgrade.ts | 2 +- .../cosmos/vesting/module/v1/module.ts | 2 +- src/protobuf/cosmos/vesting/v1beta1/tx.ts | 2 +- .../cosmos/vesting/v1beta1/vesting.ts | 2 +- src/protobuf/cosmos_proto/cosmos.ts | 2 +- src/protobuf/gogoproto/gogo.ts | 2 +- src/protobuf/google/api/annotations.ts | 2 +- src/protobuf/google/api/http.ts | 2 +- src/protobuf/google/api/httpbody.ts | 2 +- src/protobuf/google/protobuf/any.ts | 2 +- src/protobuf/google/protobuf/descriptor.ts | 2250 ++------------- src/protobuf/google/protobuf/duration.ts | 2 +- src/protobuf/google/protobuf/empty.ts | 2 +- src/protobuf/google/protobuf/timestamp.ts | 2 +- .../ibc-apps/packetforward/v1/genesis.ts | 2 +- .../ibc-apps/packetforward/v1/query.ts | 2 +- src/protobuf/ibc-apps/packetforward/v1/tx.ts | 2 +- src/protobuf/ibc/applications/fee/v1/ack.ts | 2 +- src/protobuf/ibc/applications/fee/v1/fee.ts | 2 +- .../ibc/applications/fee/v1/genesis.ts | 2 +- .../ibc/applications/fee/v1/metadata.ts | 2 +- src/protobuf/ibc/applications/fee/v1/query.ts | 2 +- src/protobuf/ibc/applications/fee/v1/tx.ts | 2 +- .../controller/v1/controller.ts | 2 +- .../controller/v1/query.ts | 2 +- .../interchain_accounts/controller/v1/tx.ts | 2 +- .../interchain_accounts/genesis/v1/genesis.ts | 2 +- .../interchain_accounts/host/v1/host.ts | 2 +- .../interchain_accounts/host/v1/query.ts | 2 +- .../interchain_accounts/host/v1/tx.ts | 2 +- .../interchain_accounts/v1/account.ts | 2 +- .../interchain_accounts/v1/metadata.ts | 2 +- .../interchain_accounts/v1/packet.ts | 2 +- .../ibc/applications/transfer/v1/authz.ts | 2 +- .../ibc/applications/transfer/v1/genesis.ts | 2 +- .../ibc/applications/transfer/v1/query.ts | 2 +- .../ibc/applications/transfer/v1/transfer.ts | 2 +- .../ibc/applications/transfer/v1/tx.ts | 2 +- .../ibc/applications/transfer/v2/packet.ts | 2 +- src/protobuf/ibc/core/channel/v1/channel.ts | 2 +- .../ibc/core/channel/v1/channel_upgrade.ts | 2 +- src/protobuf/ibc/core/channel/v1/genesis.ts | 2 +- src/protobuf/ibc/core/channel/v1/query.ts | 2 +- src/protobuf/ibc/core/channel/v1/tx.ts | 2 +- src/protobuf/ibc/core/client/v1/client.ts | 2 +- src/protobuf/ibc/core/client/v1/genesis.ts | 2 +- src/protobuf/ibc/core/client/v1/query.ts | 2 +- src/protobuf/ibc/core/client/v1/tx.ts | 2 +- .../ibc/core/commitment/v1/commitment.ts | 2 +- .../ibc/core/connection/v1/connection.ts | 2 +- .../ibc/core/connection/v1/genesis.ts | 2 +- src/protobuf/ibc/core/connection/v1/query.ts | 2 +- src/protobuf/ibc/core/connection/v1/tx.ts | 2 +- src/protobuf/ibc/core/types/v1/genesis.ts | 2 +- .../lightclients/localhost/v2/localhost.ts | 2 +- .../solomachine/v2/solomachine.ts | 2 +- .../solomachine/v3/solomachine.ts | 2 +- .../lightclients/tendermint/v1/tendermint.ts | 2 +- .../ibc/lightclients/wasm/v1/genesis.ts | 177 -- .../ibc/lightclients/wasm/v1/query.ts | 359 --- src/protobuf/ibc/lightclients/wasm/v1/tx.ts | 528 ---- src/protobuf/ibc/lightclients/wasm/v1/wasm.ts | 351 --- .../secret/compute/v1beta1/genesis.ts | 2 +- src/protobuf/secret/compute/v1beta1/msg.ts | 2 +- src/protobuf/secret/compute/v1beta1/query.ts | 2 +- src/protobuf/secret/compute/v1beta1/types.ts | 2 +- .../secret/emergencybutton/v1beta1/genesis.ts | 2 +- .../secret/emergencybutton/v1beta1/params.ts | 2 +- .../secret/emergencybutton/v1beta1/query.ts | 2 +- .../secret/emergencybutton/v1beta1/tx.ts | 2 +- .../remote_attestation/v1beta1/types.ts | 2 +- .../secret/registration/v1beta1/genesis.ts | 2 +- .../secret/registration/v1beta1/msg.ts | 2 +- .../secret/registration/v1beta1/query.ts | 2 +- .../secret/registration/v1beta1/types.ts | 2 +- src/protobuf/tendermint/abci/types.ts | 2 +- src/protobuf/tendermint/blocksync/types.ts | 2 +- src/protobuf/tendermint/consensus/types.ts | 2 +- src/protobuf/tendermint/consensus/wal.ts | 2 +- src/protobuf/tendermint/crypto/keys.ts | 2 +- src/protobuf/tendermint/crypto/proof.ts | 2 +- src/protobuf/tendermint/libs/bits/types.ts | 2 +- src/protobuf/tendermint/mempool/types.ts | 2 +- src/protobuf/tendermint/p2p/conn.ts | 2 +- src/protobuf/tendermint/p2p/pex.ts | 2 +- src/protobuf/tendermint/p2p/types.ts | 2 +- src/protobuf/tendermint/privval/types.ts | 2 +- src/protobuf/tendermint/rpc/grpc/types.ts | 2 +- src/protobuf/tendermint/state/types.ts | 2 +- src/protobuf/tendermint/statesync/types.ts | 2 +- src/protobuf/tendermint/store/types.ts | 2 +- src/protobuf/tendermint/types/block.ts | 2 +- src/protobuf/tendermint/types/canonical.ts | 2 +- src/protobuf/tendermint/types/events.ts | 2 +- src/protobuf/tendermint/types/evidence.ts | 2 +- src/protobuf/tendermint/types/params.ts | 2 +- src/protobuf/tendermint/types/types.ts | 2 +- src/protobuf/tendermint/types/validator.ts | 2 +- src/protobuf/tendermint/version/types.ts | 2 +- src/query/circuit.ts | 43 - src/query/group.ts | 175 -- src/query/ibc_wasm.ts | 31 - src/query/index.ts | 4 - src/query/nft.ts | 88 - src/query/tendermint.ts | 2 +- 252 files changed, 408 insertions(+), 16537 deletions(-) delete mode 100644 src/grpc_gateway/cosmos/circuit/module/v1/module.pb.ts delete mode 100644 src/grpc_gateway/cosmos/circuit/v1/query.pb.ts delete mode 100644 src/grpc_gateway/cosmos/circuit/v1/tx.pb.ts delete mode 100644 src/grpc_gateway/cosmos/circuit/v1/types.pb.ts delete mode 100644 src/grpc_gateway/cosmos/group/module/v1/module.pb.ts delete mode 100644 src/grpc_gateway/cosmos/group/v1/events.pb.ts delete mode 100644 src/grpc_gateway/cosmos/group/v1/genesis.pb.ts delete mode 100644 src/grpc_gateway/cosmos/group/v1/query.pb.ts delete mode 100644 src/grpc_gateway/cosmos/group/v1/tx.pb.ts delete mode 100644 src/grpc_gateway/cosmos/group/v1/types.pb.ts delete mode 100644 src/grpc_gateway/cosmos/nft/module/v1/module.pb.ts delete mode 100644 src/grpc_gateway/cosmos/nft/v1beta1/event.pb.ts delete mode 100644 src/grpc_gateway/cosmos/nft/v1beta1/genesis.pb.ts delete mode 100644 src/grpc_gateway/cosmos/nft/v1beta1/nft.pb.ts delete mode 100644 src/grpc_gateway/cosmos/nft/v1beta1/query.pb.ts delete mode 100644 src/grpc_gateway/cosmos/nft/v1beta1/tx.pb.ts delete mode 100644 src/grpc_gateway/ibc/lightclients/wasm/v1/genesis.pb.ts delete mode 100644 src/grpc_gateway/ibc/lightclients/wasm/v1/query.pb.ts delete mode 100644 src/grpc_gateway/ibc/lightclients/wasm/v1/tx.pb.ts delete mode 100644 src/grpc_gateway/ibc/lightclients/wasm/v1/wasm.pb.ts delete mode 100644 src/protobuf/cosmos/circuit/module/v1/module.ts delete mode 100644 src/protobuf/cosmos/circuit/v1/query.ts delete mode 100644 src/protobuf/cosmos/circuit/v1/tx.ts delete mode 100644 src/protobuf/cosmos/circuit/v1/types.ts delete mode 100644 src/protobuf/cosmos/group/module/v1/module.ts delete mode 100644 src/protobuf/cosmos/group/v1/events.ts delete mode 100644 src/protobuf/cosmos/group/v1/genesis.ts delete mode 100644 src/protobuf/cosmos/group/v1/query.ts delete mode 100644 src/protobuf/cosmos/group/v1/tx.ts delete mode 100644 src/protobuf/cosmos/group/v1/types.ts delete mode 100644 src/protobuf/cosmos/nft/module/v1/module.ts delete mode 100644 src/protobuf/cosmos/nft/v1beta1/event.ts delete mode 100644 src/protobuf/cosmos/nft/v1beta1/genesis.ts delete mode 100644 src/protobuf/cosmos/nft/v1beta1/nft.ts delete mode 100644 src/protobuf/cosmos/nft/v1beta1/query.ts delete mode 100644 src/protobuf/cosmos/nft/v1beta1/tx.ts delete mode 100644 src/protobuf/ibc/lightclients/wasm/v1/genesis.ts delete mode 100644 src/protobuf/ibc/lightclients/wasm/v1/query.ts delete mode 100644 src/protobuf/ibc/lightclients/wasm/v1/tx.ts delete mode 100644 src/protobuf/ibc/lightclients/wasm/v1/wasm.ts delete mode 100644 src/query/circuit.ts delete mode 100644 src/query/group.ts delete mode 100644 src/query/ibc_wasm.ts delete mode 100644 src/query/nft.ts diff --git a/src/grpc_gateway/cosmos/circuit/module/v1/module.pb.ts b/src/grpc_gateway/cosmos/circuit/module/v1/module.pb.ts deleted file mode 100644 index ba3828d7..00000000 --- a/src/grpc_gateway/cosmos/circuit/module/v1/module.pb.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* eslint-disable */ -// @ts-nocheck -/* -* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY -*/ -export type Module = { - authority?: string -} \ No newline at end of file diff --git a/src/grpc_gateway/cosmos/circuit/v1/query.pb.ts b/src/grpc_gateway/cosmos/circuit/v1/query.pb.ts deleted file mode 100644 index 20627ca9..00000000 --- a/src/grpc_gateway/cosmos/circuit/v1/query.pb.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* eslint-disable */ -// @ts-nocheck -/* -* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY -*/ - -import * as fm from "../../../fetch.pb" -import * as CosmosBaseQueryV1beta1Pagination from "../../base/query/v1beta1/pagination.pb" -import * as CosmosCircuitV1Types from "./types.pb" -export type QueryAccountRequest = { - address?: string -} - -export type AccountResponse = { - permission?: CosmosCircuitV1Types.Permissions -} - -export type QueryAccountsRequest = { - pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest -} - -export type AccountsResponse = { - accounts?: CosmosCircuitV1Types.GenesisAccountPermissions[] - pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse -} - -export type QueryDisabledListRequest = { -} - -export type DisabledListResponse = { - disabled_list?: string[] -} - -export class Query { - static Account(req: QueryAccountRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos/circuit/v1/accounts/${req["address"]}?${fm.renderURLSearchParams(req, ["address"])}`, {...initReq, method: "GET"}) - } - static Accounts(req: QueryAccountsRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos/circuit/v1/accounts?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) - } - static DisabledList(req: QueryDisabledListRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos/circuit/v1/disable_list?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) - } -} \ No newline at end of file diff --git a/src/grpc_gateway/cosmos/circuit/v1/tx.pb.ts b/src/grpc_gateway/cosmos/circuit/v1/tx.pb.ts deleted file mode 100644 index b8272637..00000000 --- a/src/grpc_gateway/cosmos/circuit/v1/tx.pb.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* eslint-disable */ -// @ts-nocheck -/* -* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY -*/ - -import * as fm from "../../../fetch.pb" -import * as CosmosCircuitV1Types from "./types.pb" -export type MsgAuthorizeCircuitBreaker = { - granter?: string - grantee?: string - permissions?: CosmosCircuitV1Types.Permissions -} - -export type MsgAuthorizeCircuitBreakerResponse = { - success?: boolean -} - -export type MsgTripCircuitBreaker = { - authority?: string - msg_type_urls?: string[] -} - -export type MsgTripCircuitBreakerResponse = { - success?: boolean -} - -export type MsgResetCircuitBreaker = { - authority?: string - msg_type_urls?: string[] -} - -export type MsgResetCircuitBreakerResponse = { - success?: boolean -} - -export class Msg { - static AuthorizeCircuitBreaker(req: MsgAuthorizeCircuitBreaker, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos.circuit.v1.Msg/AuthorizeCircuitBreaker`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) - } - static TripCircuitBreaker(req: MsgTripCircuitBreaker, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos.circuit.v1.Msg/TripCircuitBreaker`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) - } - static ResetCircuitBreaker(req: MsgResetCircuitBreaker, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos.circuit.v1.Msg/ResetCircuitBreaker`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) - } -} \ No newline at end of file diff --git a/src/grpc_gateway/cosmos/circuit/v1/types.pb.ts b/src/grpc_gateway/cosmos/circuit/v1/types.pb.ts deleted file mode 100644 index 9fec541b..00000000 --- a/src/grpc_gateway/cosmos/circuit/v1/types.pb.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* eslint-disable */ -// @ts-nocheck -/* -* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY -*/ - -export enum PermissionsLevel { - LEVEL_NONE_UNSPECIFIED = "LEVEL_NONE_UNSPECIFIED", - LEVEL_SOME_MSGS = "LEVEL_SOME_MSGS", - LEVEL_ALL_MSGS = "LEVEL_ALL_MSGS", - LEVEL_SUPER_ADMIN = "LEVEL_SUPER_ADMIN", -} - -export type Permissions = { - level?: PermissionsLevel - limit_type_urls?: string[] -} - -export type GenesisAccountPermissions = { - address?: string - permissions?: Permissions -} - -export type GenesisState = { - account_permissions?: GenesisAccountPermissions[] - disabled_type_urls?: string[] -} \ No newline at end of file diff --git a/src/grpc_gateway/cosmos/group/module/v1/module.pb.ts b/src/grpc_gateway/cosmos/group/module/v1/module.pb.ts deleted file mode 100644 index 9d012274..00000000 --- a/src/grpc_gateway/cosmos/group/module/v1/module.pb.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* eslint-disable */ -// @ts-nocheck -/* -* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY -*/ - -import * as GoogleProtobufDuration from "../../../../google/protobuf/duration.pb" -export type Module = { - max_execution_period?: GoogleProtobufDuration.Duration - max_metadata_len?: string -} \ No newline at end of file diff --git a/src/grpc_gateway/cosmos/group/v1/events.pb.ts b/src/grpc_gateway/cosmos/group/v1/events.pb.ts deleted file mode 100644 index 188b4e6f..00000000 --- a/src/grpc_gateway/cosmos/group/v1/events.pb.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* eslint-disable */ -// @ts-nocheck -/* -* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY -*/ - -import * as CosmosGroupV1Types from "./types.pb" -export type EventCreateGroup = { - group_id?: string -} - -export type EventUpdateGroup = { - group_id?: string -} - -export type EventCreateGroupPolicy = { - address?: string -} - -export type EventUpdateGroupPolicy = { - address?: string -} - -export type EventSubmitProposal = { - proposal_id?: string -} - -export type EventWithdrawProposal = { - proposal_id?: string -} - -export type EventVote = { - proposal_id?: string -} - -export type EventExec = { - proposal_id?: string - result?: CosmosGroupV1Types.ProposalExecutorResult - logs?: string -} - -export type EventLeaveGroup = { - group_id?: string - address?: string -} - -export type EventProposalPruned = { - proposal_id?: string - status?: CosmosGroupV1Types.ProposalStatus - tally_result?: CosmosGroupV1Types.TallyResult -} \ No newline at end of file diff --git a/src/grpc_gateway/cosmos/group/v1/genesis.pb.ts b/src/grpc_gateway/cosmos/group/v1/genesis.pb.ts deleted file mode 100644 index f02b9ac4..00000000 --- a/src/grpc_gateway/cosmos/group/v1/genesis.pb.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* eslint-disable */ -// @ts-nocheck -/* -* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY -*/ - -import * as CosmosGroupV1Types from "./types.pb" -export type GenesisState = { - group_seq?: string - groups?: CosmosGroupV1Types.GroupInfo[] - group_members?: CosmosGroupV1Types.GroupMember[] - group_policy_seq?: string - group_policies?: CosmosGroupV1Types.GroupPolicyInfo[] - proposal_seq?: string - proposals?: CosmosGroupV1Types.Proposal[] - votes?: CosmosGroupV1Types.Vote[] -} \ No newline at end of file diff --git a/src/grpc_gateway/cosmos/group/v1/query.pb.ts b/src/grpc_gateway/cosmos/group/v1/query.pb.ts deleted file mode 100644 index a54496d4..00000000 --- a/src/grpc_gateway/cosmos/group/v1/query.pb.ts +++ /dev/null @@ -1,183 +0,0 @@ -/* eslint-disable */ -// @ts-nocheck -/* -* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY -*/ - -import * as fm from "../../../fetch.pb" -import * as CosmosBaseQueryV1beta1Pagination from "../../base/query/v1beta1/pagination.pb" -import * as CosmosGroupV1Types from "./types.pb" -export type QueryGroupInfoRequest = { - group_id?: string -} - -export type QueryGroupInfoResponse = { - info?: CosmosGroupV1Types.GroupInfo -} - -export type QueryGroupPolicyInfoRequest = { - address?: string -} - -export type QueryGroupPolicyInfoResponse = { - info?: CosmosGroupV1Types.GroupPolicyInfo -} - -export type QueryGroupMembersRequest = { - group_id?: string - pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest -} - -export type QueryGroupMembersResponse = { - members?: CosmosGroupV1Types.GroupMember[] - pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse -} - -export type QueryGroupsByAdminRequest = { - admin?: string - pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest -} - -export type QueryGroupsByAdminResponse = { - groups?: CosmosGroupV1Types.GroupInfo[] - pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse -} - -export type QueryGroupPoliciesByGroupRequest = { - group_id?: string - pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest -} - -export type QueryGroupPoliciesByGroupResponse = { - group_policies?: CosmosGroupV1Types.GroupPolicyInfo[] - pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse -} - -export type QueryGroupPoliciesByAdminRequest = { - admin?: string - pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest -} - -export type QueryGroupPoliciesByAdminResponse = { - group_policies?: CosmosGroupV1Types.GroupPolicyInfo[] - pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse -} - -export type QueryProposalRequest = { - proposal_id?: string -} - -export type QueryProposalResponse = { - proposal?: CosmosGroupV1Types.Proposal -} - -export type QueryProposalsByGroupPolicyRequest = { - address?: string - pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest -} - -export type QueryProposalsByGroupPolicyResponse = { - proposals?: CosmosGroupV1Types.Proposal[] - pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse -} - -export type QueryVoteByProposalVoterRequest = { - proposal_id?: string - voter?: string -} - -export type QueryVoteByProposalVoterResponse = { - vote?: CosmosGroupV1Types.Vote -} - -export type QueryVotesByProposalRequest = { - proposal_id?: string - pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest -} - -export type QueryVotesByProposalResponse = { - votes?: CosmosGroupV1Types.Vote[] - pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse -} - -export type QueryVotesByVoterRequest = { - voter?: string - pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest -} - -export type QueryVotesByVoterResponse = { - votes?: CosmosGroupV1Types.Vote[] - pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse -} - -export type QueryGroupsByMemberRequest = { - address?: string - pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest -} - -export type QueryGroupsByMemberResponse = { - groups?: CosmosGroupV1Types.GroupInfo[] - pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse -} - -export type QueryTallyResultRequest = { - proposal_id?: string -} - -export type QueryTallyResultResponse = { - tally?: CosmosGroupV1Types.TallyResult -} - -export type QueryGroupsRequest = { - pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest -} - -export type QueryGroupsResponse = { - groups?: CosmosGroupV1Types.GroupInfo[] - pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse -} - -export class Query { - static GroupInfo(req: QueryGroupInfoRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos/group/v1/group_info/${req["group_id"]}?${fm.renderURLSearchParams(req, ["group_id"])}`, {...initReq, method: "GET"}) - } - static GroupPolicyInfo(req: QueryGroupPolicyInfoRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos/group/v1/group_policy_info/${req["address"]}?${fm.renderURLSearchParams(req, ["address"])}`, {...initReq, method: "GET"}) - } - static GroupMembers(req: QueryGroupMembersRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos/group/v1/group_members/${req["group_id"]}?${fm.renderURLSearchParams(req, ["group_id"])}`, {...initReq, method: "GET"}) - } - static GroupsByAdmin(req: QueryGroupsByAdminRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos/group/v1/groups_by_admin/${req["admin"]}?${fm.renderURLSearchParams(req, ["admin"])}`, {...initReq, method: "GET"}) - } - static GroupPoliciesByGroup(req: QueryGroupPoliciesByGroupRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos/group/v1/group_policies_by_group/${req["group_id"]}?${fm.renderURLSearchParams(req, ["group_id"])}`, {...initReq, method: "GET"}) - } - static GroupPoliciesByAdmin(req: QueryGroupPoliciesByAdminRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos/group/v1/group_policies_by_admin/${req["admin"]}?${fm.renderURLSearchParams(req, ["admin"])}`, {...initReq, method: "GET"}) - } - static Proposal(req: QueryProposalRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos/group/v1/proposal/${req["proposal_id"]}?${fm.renderURLSearchParams(req, ["proposal_id"])}`, {...initReq, method: "GET"}) - } - static ProposalsByGroupPolicy(req: QueryProposalsByGroupPolicyRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos/group/v1/proposals_by_group_policy/${req["address"]}?${fm.renderURLSearchParams(req, ["address"])}`, {...initReq, method: "GET"}) - } - static VoteByProposalVoter(req: QueryVoteByProposalVoterRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos/group/v1/vote_by_proposal_voter/${req["proposal_id"]}/${req["voter"]}?${fm.renderURLSearchParams(req, ["proposal_id", "voter"])}`, {...initReq, method: "GET"}) - } - static VotesByProposal(req: QueryVotesByProposalRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos/group/v1/votes_by_proposal/${req["proposal_id"]}?${fm.renderURLSearchParams(req, ["proposal_id"])}`, {...initReq, method: "GET"}) - } - static VotesByVoter(req: QueryVotesByVoterRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos/group/v1/votes_by_voter/${req["voter"]}?${fm.renderURLSearchParams(req, ["voter"])}`, {...initReq, method: "GET"}) - } - static GroupsByMember(req: QueryGroupsByMemberRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos/group/v1/groups_by_member/${req["address"]}?${fm.renderURLSearchParams(req, ["address"])}`, {...initReq, method: "GET"}) - } - static TallyResult(req: QueryTallyResultRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos/group/v1/proposals/${req["proposal_id"]}/tally?${fm.renderURLSearchParams(req, ["proposal_id"])}`, {...initReq, method: "GET"}) - } - static Groups(req: QueryGroupsRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos/group/v1/groups?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) - } -} \ No newline at end of file diff --git a/src/grpc_gateway/cosmos/group/v1/tx.pb.ts b/src/grpc_gateway/cosmos/group/v1/tx.pb.ts deleted file mode 100644 index c6b40191..00000000 --- a/src/grpc_gateway/cosmos/group/v1/tx.pb.ts +++ /dev/null @@ -1,198 +0,0 @@ -/* eslint-disable */ -// @ts-nocheck -/* -* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY -*/ - -import * as fm from "../../../fetch.pb" -import * as GoogleProtobufAny from "../../../google/protobuf/any.pb" -import * as CosmosGroupV1Types from "./types.pb" - -export enum Exec { - EXEC_UNSPECIFIED = "EXEC_UNSPECIFIED", - EXEC_TRY = "EXEC_TRY", -} - -export type MsgCreateGroup = { - admin?: string - members?: CosmosGroupV1Types.MemberRequest[] - metadata?: string -} - -export type MsgCreateGroupResponse = { - group_id?: string -} - -export type MsgUpdateGroupMembers = { - admin?: string - group_id?: string - member_updates?: CosmosGroupV1Types.MemberRequest[] -} - -export type MsgUpdateGroupMembersResponse = { -} - -export type MsgUpdateGroupAdmin = { - admin?: string - group_id?: string - new_admin?: string -} - -export type MsgUpdateGroupAdminResponse = { -} - -export type MsgUpdateGroupMetadata = { - admin?: string - group_id?: string - metadata?: string -} - -export type MsgUpdateGroupMetadataResponse = { -} - -export type MsgCreateGroupPolicy = { - admin?: string - group_id?: string - metadata?: string - decision_policy?: GoogleProtobufAny.Any -} - -export type MsgCreateGroupPolicyResponse = { - address?: string -} - -export type MsgUpdateGroupPolicyAdmin = { - admin?: string - group_policy_address?: string - new_admin?: string -} - -export type MsgUpdateGroupPolicyAdminResponse = { -} - -export type MsgCreateGroupWithPolicy = { - admin?: string - members?: CosmosGroupV1Types.MemberRequest[] - group_metadata?: string - group_policy_metadata?: string - group_policy_as_admin?: boolean - decision_policy?: GoogleProtobufAny.Any -} - -export type MsgCreateGroupWithPolicyResponse = { - group_id?: string - group_policy_address?: string -} - -export type MsgUpdateGroupPolicyDecisionPolicy = { - admin?: string - group_policy_address?: string - decision_policy?: GoogleProtobufAny.Any -} - -export type MsgUpdateGroupPolicyDecisionPolicyResponse = { -} - -export type MsgUpdateGroupPolicyMetadata = { - admin?: string - group_policy_address?: string - metadata?: string -} - -export type MsgUpdateGroupPolicyMetadataResponse = { -} - -export type MsgSubmitProposal = { - group_policy_address?: string - proposers?: string[] - metadata?: string - messages?: GoogleProtobufAny.Any[] - exec?: Exec - title?: string - summary?: string -} - -export type MsgSubmitProposalResponse = { - proposal_id?: string -} - -export type MsgWithdrawProposal = { - proposal_id?: string - address?: string -} - -export type MsgWithdrawProposalResponse = { -} - -export type MsgVote = { - proposal_id?: string - voter?: string - option?: CosmosGroupV1Types.VoteOption - metadata?: string - exec?: Exec -} - -export type MsgVoteResponse = { -} - -export type MsgExec = { - proposal_id?: string - executor?: string -} - -export type MsgExecResponse = { - result?: CosmosGroupV1Types.ProposalExecutorResult -} - -export type MsgLeaveGroup = { - address?: string - group_id?: string -} - -export type MsgLeaveGroupResponse = { -} - -export class Msg { - static CreateGroup(req: MsgCreateGroup, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos.group.v1.Msg/CreateGroup`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) - } - static UpdateGroupMembers(req: MsgUpdateGroupMembers, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos.group.v1.Msg/UpdateGroupMembers`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) - } - static UpdateGroupAdmin(req: MsgUpdateGroupAdmin, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos.group.v1.Msg/UpdateGroupAdmin`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) - } - static UpdateGroupMetadata(req: MsgUpdateGroupMetadata, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos.group.v1.Msg/UpdateGroupMetadata`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) - } - static CreateGroupPolicy(req: MsgCreateGroupPolicy, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos.group.v1.Msg/CreateGroupPolicy`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) - } - static CreateGroupWithPolicy(req: MsgCreateGroupWithPolicy, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos.group.v1.Msg/CreateGroupWithPolicy`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) - } - static UpdateGroupPolicyAdmin(req: MsgUpdateGroupPolicyAdmin, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos.group.v1.Msg/UpdateGroupPolicyAdmin`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) - } - static UpdateGroupPolicyDecisionPolicy(req: MsgUpdateGroupPolicyDecisionPolicy, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos.group.v1.Msg/UpdateGroupPolicyDecisionPolicy`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) - } - static UpdateGroupPolicyMetadata(req: MsgUpdateGroupPolicyMetadata, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos.group.v1.Msg/UpdateGroupPolicyMetadata`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) - } - static SubmitProposal(req: MsgSubmitProposal, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos.group.v1.Msg/SubmitProposal`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) - } - static WithdrawProposal(req: MsgWithdrawProposal, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos.group.v1.Msg/WithdrawProposal`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) - } - static Vote(req: MsgVote, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos.group.v1.Msg/Vote`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) - } - static Exec(req: MsgExec, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos.group.v1.Msg/Exec`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) - } - static LeaveGroup(req: MsgLeaveGroup, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos.group.v1.Msg/LeaveGroup`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) - } -} \ No newline at end of file diff --git a/src/grpc_gateway/cosmos/group/v1/types.pb.ts b/src/grpc_gateway/cosmos/group/v1/types.pb.ts deleted file mode 100644 index c2b0096b..00000000 --- a/src/grpc_gateway/cosmos/group/v1/types.pb.ts +++ /dev/null @@ -1,117 +0,0 @@ -/* eslint-disable */ -// @ts-nocheck -/* -* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY -*/ - -import * as GoogleProtobufAny from "../../../google/protobuf/any.pb" -import * as GoogleProtobufDuration from "../../../google/protobuf/duration.pb" -import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb" - -export enum VoteOption { - VOTE_OPTION_UNSPECIFIED = "VOTE_OPTION_UNSPECIFIED", - VOTE_OPTION_YES = "VOTE_OPTION_YES", - VOTE_OPTION_ABSTAIN = "VOTE_OPTION_ABSTAIN", - VOTE_OPTION_NO = "VOTE_OPTION_NO", - VOTE_OPTION_NO_WITH_VETO = "VOTE_OPTION_NO_WITH_VETO", -} - -export enum ProposalStatus { - PROPOSAL_STATUS_UNSPECIFIED = "PROPOSAL_STATUS_UNSPECIFIED", - PROPOSAL_STATUS_SUBMITTED = "PROPOSAL_STATUS_SUBMITTED", - PROPOSAL_STATUS_ACCEPTED = "PROPOSAL_STATUS_ACCEPTED", - PROPOSAL_STATUS_REJECTED = "PROPOSAL_STATUS_REJECTED", - PROPOSAL_STATUS_ABORTED = "PROPOSAL_STATUS_ABORTED", - PROPOSAL_STATUS_WITHDRAWN = "PROPOSAL_STATUS_WITHDRAWN", -} - -export enum ProposalExecutorResult { - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED = "PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED", - PROPOSAL_EXECUTOR_RESULT_NOT_RUN = "PROPOSAL_EXECUTOR_RESULT_NOT_RUN", - PROPOSAL_EXECUTOR_RESULT_SUCCESS = "PROPOSAL_EXECUTOR_RESULT_SUCCESS", - PROPOSAL_EXECUTOR_RESULT_FAILURE = "PROPOSAL_EXECUTOR_RESULT_FAILURE", -} - -export type Member = { - address?: string - weight?: string - metadata?: string - added_at?: GoogleProtobufTimestamp.Timestamp -} - -export type MemberRequest = { - address?: string - weight?: string - metadata?: string -} - -export type ThresholdDecisionPolicy = { - threshold?: string - windows?: DecisionPolicyWindows -} - -export type PercentageDecisionPolicy = { - percentage?: string - windows?: DecisionPolicyWindows -} - -export type DecisionPolicyWindows = { - voting_period?: GoogleProtobufDuration.Duration - min_execution_period?: GoogleProtobufDuration.Duration -} - -export type GroupInfo = { - id?: string - admin?: string - metadata?: string - version?: string - total_weight?: string - created_at?: GoogleProtobufTimestamp.Timestamp -} - -export type GroupMember = { - group_id?: string - member?: Member -} - -export type GroupPolicyInfo = { - address?: string - group_id?: string - admin?: string - metadata?: string - version?: string - decision_policy?: GoogleProtobufAny.Any - created_at?: GoogleProtobufTimestamp.Timestamp -} - -export type Proposal = { - id?: string - group_policy_address?: string - metadata?: string - proposers?: string[] - submit_time?: GoogleProtobufTimestamp.Timestamp - group_version?: string - group_policy_version?: string - status?: ProposalStatus - final_tally_result?: TallyResult - voting_period_end?: GoogleProtobufTimestamp.Timestamp - executor_result?: ProposalExecutorResult - messages?: GoogleProtobufAny.Any[] - title?: string - summary?: string -} - -export type TallyResult = { - yes_count?: string - abstain_count?: string - no_count?: string - no_with_veto_count?: string -} - -export type Vote = { - proposal_id?: string - voter?: string - option?: VoteOption - metadata?: string - submit_time?: GoogleProtobufTimestamp.Timestamp -} \ No newline at end of file diff --git a/src/grpc_gateway/cosmos/nft/module/v1/module.pb.ts b/src/grpc_gateway/cosmos/nft/module/v1/module.pb.ts deleted file mode 100644 index 86a7973f..00000000 --- a/src/grpc_gateway/cosmos/nft/module/v1/module.pb.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* eslint-disable */ -// @ts-nocheck -/* -* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY -*/ -export type Module = { -} \ No newline at end of file diff --git a/src/grpc_gateway/cosmos/nft/v1beta1/event.pb.ts b/src/grpc_gateway/cosmos/nft/v1beta1/event.pb.ts deleted file mode 100644 index ee77801f..00000000 --- a/src/grpc_gateway/cosmos/nft/v1beta1/event.pb.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* eslint-disable */ -// @ts-nocheck -/* -* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY -*/ -export type EventSend = { - class_id?: string - id?: string - sender?: string - receiver?: string -} - -export type EventMint = { - class_id?: string - id?: string - owner?: string -} - -export type EventBurn = { - class_id?: string - id?: string - owner?: string -} \ No newline at end of file diff --git a/src/grpc_gateway/cosmos/nft/v1beta1/genesis.pb.ts b/src/grpc_gateway/cosmos/nft/v1beta1/genesis.pb.ts deleted file mode 100644 index b6a364b3..00000000 --- a/src/grpc_gateway/cosmos/nft/v1beta1/genesis.pb.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* eslint-disable */ -// @ts-nocheck -/* -* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY -*/ - -import * as CosmosNftV1beta1Nft from "./nft.pb" -export type GenesisState = { - classes?: CosmosNftV1beta1Nft.Class[] - entries?: Entry[] -} - -export type Entry = { - owner?: string - nfts?: CosmosNftV1beta1Nft.NFT[] -} \ No newline at end of file diff --git a/src/grpc_gateway/cosmos/nft/v1beta1/nft.pb.ts b/src/grpc_gateway/cosmos/nft/v1beta1/nft.pb.ts deleted file mode 100644 index 9efd7ea6..00000000 --- a/src/grpc_gateway/cosmos/nft/v1beta1/nft.pb.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* eslint-disable */ -// @ts-nocheck -/* -* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY -*/ - -import * as GoogleProtobufAny from "../../../google/protobuf/any.pb" -export type Class = { - id?: string - name?: string - symbol?: string - description?: string - uri?: string - uri_hash?: string - data?: GoogleProtobufAny.Any -} - -export type NFT = { - class_id?: string - id?: string - uri?: string - uri_hash?: string - data?: GoogleProtobufAny.Any -} \ No newline at end of file diff --git a/src/grpc_gateway/cosmos/nft/v1beta1/query.pb.ts b/src/grpc_gateway/cosmos/nft/v1beta1/query.pb.ts deleted file mode 100644 index a5c2bc2a..00000000 --- a/src/grpc_gateway/cosmos/nft/v1beta1/query.pb.ts +++ /dev/null @@ -1,95 +0,0 @@ -/* eslint-disable */ -// @ts-nocheck -/* -* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY -*/ - -import * as fm from "../../../fetch.pb" -import * as CosmosBaseQueryV1beta1Pagination from "../../base/query/v1beta1/pagination.pb" -import * as CosmosNftV1beta1Nft from "./nft.pb" -export type QueryBalanceRequest = { - class_id?: string - owner?: string -} - -export type QueryBalanceResponse = { - amount?: string -} - -export type QueryOwnerRequest = { - class_id?: string - id?: string -} - -export type QueryOwnerResponse = { - owner?: string -} - -export type QuerySupplyRequest = { - class_id?: string -} - -export type QuerySupplyResponse = { - amount?: string -} - -export type QueryNFTsRequest = { - class_id?: string - owner?: string - pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest -} - -export type QueryNFTsResponse = { - nfts?: CosmosNftV1beta1Nft.NFT[] - pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse -} - -export type QueryNFTRequest = { - class_id?: string - id?: string -} - -export type QueryNFTResponse = { - nft?: CosmosNftV1beta1Nft.NFT -} - -export type QueryClassRequest = { - class_id?: string -} - -export type QueryClassResponse = { - class?: CosmosNftV1beta1Nft.Class -} - -export type QueryClassesRequest = { - pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest -} - -export type QueryClassesResponse = { - classes?: CosmosNftV1beta1Nft.Class[] - pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse -} - -export class Query { - static Balance(req: QueryBalanceRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos/nft/v1beta1/balance/${req["owner"]}/${req["class_id"]}?${fm.renderURLSearchParams(req, ["owner", "class_id"])}`, {...initReq, method: "GET"}) - } - static Owner(req: QueryOwnerRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos/nft/v1beta1/owner/${req["class_id"]}/${req["id"]}?${fm.renderURLSearchParams(req, ["class_id", "id"])}`, {...initReq, method: "GET"}) - } - static Supply(req: QuerySupplyRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos/nft/v1beta1/supply/${req["class_id"]}?${fm.renderURLSearchParams(req, ["class_id"])}`, {...initReq, method: "GET"}) - } - static NFTs(req: QueryNFTsRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos/nft/v1beta1/nfts?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) - } - static NFT(req: QueryNFTRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos/nft/v1beta1/nfts/${req["class_id"]}/${req["id"]}?${fm.renderURLSearchParams(req, ["class_id", "id"])}`, {...initReq, method: "GET"}) - } - static Class(req: QueryClassRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos/nft/v1beta1/classes/${req["class_id"]}?${fm.renderURLSearchParams(req, ["class_id"])}`, {...initReq, method: "GET"}) - } - static Classes(req: QueryClassesRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos/nft/v1beta1/classes?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) - } -} \ No newline at end of file diff --git a/src/grpc_gateway/cosmos/nft/v1beta1/tx.pb.ts b/src/grpc_gateway/cosmos/nft/v1beta1/tx.pb.ts deleted file mode 100644 index b6db59e5..00000000 --- a/src/grpc_gateway/cosmos/nft/v1beta1/tx.pb.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* eslint-disable */ -// @ts-nocheck -/* -* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY -*/ - -import * as fm from "../../../fetch.pb" -export type MsgSend = { - class_id?: string - id?: string - sender?: string - receiver?: string -} - -export type MsgSendResponse = { -} - -export class Msg { - static Send(req: MsgSend, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/cosmos.nft.v1beta1.Msg/Send`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) - } -} \ No newline at end of file diff --git a/src/grpc_gateway/ibc/lightclients/wasm/v1/genesis.pb.ts b/src/grpc_gateway/ibc/lightclients/wasm/v1/genesis.pb.ts deleted file mode 100644 index 0f743121..00000000 --- a/src/grpc_gateway/ibc/lightclients/wasm/v1/genesis.pb.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* eslint-disable */ -// @ts-nocheck -/* -* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY -*/ -export type GenesisState = { - contracts?: Contract[] -} - -export type Contract = { - code_bytes?: Uint8Array -} \ No newline at end of file diff --git a/src/grpc_gateway/ibc/lightclients/wasm/v1/query.pb.ts b/src/grpc_gateway/ibc/lightclients/wasm/v1/query.pb.ts deleted file mode 100644 index b7d90f9e..00000000 --- a/src/grpc_gateway/ibc/lightclients/wasm/v1/query.pb.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* eslint-disable */ -// @ts-nocheck -/* -* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY -*/ - -import * as CosmosBaseQueryV1beta1Pagination from "../../../../cosmos/base/query/v1beta1/pagination.pb" -import * as fm from "../../../../fetch.pb" -export type QueryChecksumsRequest = { - pagination?: CosmosBaseQueryV1beta1Pagination.PageRequest -} - -export type QueryChecksumsResponse = { - checksums?: string[] - pagination?: CosmosBaseQueryV1beta1Pagination.PageResponse -} - -export type QueryCodeRequest = { - checksum?: string -} - -export type QueryCodeResponse = { - data?: Uint8Array -} - -export class Query { - static Checksums(req: QueryChecksumsRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/ibc/lightclients/wasm/v1/checksums?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"}) - } - static Code(req: QueryCodeRequest, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/ibc/lightclients/wasm/v1/checksums/${req["checksum"]}/code?${fm.renderURLSearchParams(req, ["checksum"])}`, {...initReq, method: "GET"}) - } -} \ No newline at end of file diff --git a/src/grpc_gateway/ibc/lightclients/wasm/v1/tx.pb.ts b/src/grpc_gateway/ibc/lightclients/wasm/v1/tx.pb.ts deleted file mode 100644 index 1227a1ca..00000000 --- a/src/grpc_gateway/ibc/lightclients/wasm/v1/tx.pb.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* eslint-disable */ -// @ts-nocheck -/* -* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY -*/ - -import * as fm from "../../../../fetch.pb" -export type MsgStoreCode = { - signer?: string - wasm_byte_code?: Uint8Array -} - -export type MsgStoreCodeResponse = { - checksum?: Uint8Array -} - -export type MsgRemoveChecksum = { - signer?: string - checksum?: Uint8Array -} - -export type MsgRemoveChecksumResponse = { -} - -export type MsgMigrateContract = { - signer?: string - client_id?: string - checksum?: Uint8Array - msg?: Uint8Array -} - -export type MsgMigrateContractResponse = { -} - -export class Msg { - static StoreCode(req: MsgStoreCode, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/ibc.lightclients.wasm.v1.Msg/StoreCode`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) - } - static RemoveChecksum(req: MsgRemoveChecksum, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/ibc.lightclients.wasm.v1.Msg/RemoveChecksum`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) - } - static MigrateContract(req: MsgMigrateContract, initReq?: fm.InitReq): Promise { - return fm.fetchReq(`/ibc.lightclients.wasm.v1.Msg/MigrateContract`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)}) - } -} \ No newline at end of file diff --git a/src/grpc_gateway/ibc/lightclients/wasm/v1/wasm.pb.ts b/src/grpc_gateway/ibc/lightclients/wasm/v1/wasm.pb.ts deleted file mode 100644 index 1b38f814..00000000 --- a/src/grpc_gateway/ibc/lightclients/wasm/v1/wasm.pb.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* eslint-disable */ -// @ts-nocheck -/* -* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY -*/ - -import * as IbcCoreClientV1Client from "../../../core/client/v1/client.pb" -export type ClientState = { - data?: Uint8Array - checksum?: Uint8Array - latest_height?: IbcCoreClientV1Client.Height -} - -export type ConsensusState = { - data?: Uint8Array -} - -export type ClientMessage = { - data?: Uint8Array -} - -export type Checksums = { - checksums?: Uint8Array[] -} \ No newline at end of file diff --git a/src/protobuf/amino/amino.ts b/src/protobuf/amino/amino.ts index 98dd7d80..c43aea68 100644 --- a/src/protobuf/amino/amino.ts +++ b/src/protobuf/amino/amino.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: amino/amino.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/app/runtime/v1alpha1/module.ts b/src/protobuf/cosmos/app/runtime/v1alpha1/module.ts index aba686b5..8f11511b 100644 --- a/src/protobuf/cosmos/app/runtime/v1alpha1/module.ts +++ b/src/protobuf/cosmos/app/runtime/v1alpha1/module.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/app/runtime/v1alpha1/module.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/app/v1alpha1/config.ts b/src/protobuf/cosmos/app/v1alpha1/config.ts index ddabad95..6471963f 100644 --- a/src/protobuf/cosmos/app/v1alpha1/config.ts +++ b/src/protobuf/cosmos/app/v1alpha1/config.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/app/v1alpha1/config.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/app/v1alpha1/module.ts b/src/protobuf/cosmos/app/v1alpha1/module.ts index 3370d2c2..6cef5411 100644 --- a/src/protobuf/cosmos/app/v1alpha1/module.ts +++ b/src/protobuf/cosmos/app/v1alpha1/module.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/app/v1alpha1/module.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/app/v1alpha1/query.ts b/src/protobuf/cosmos/app/v1alpha1/query.ts index 816485f8..8b7cef32 100644 --- a/src/protobuf/cosmos/app/v1alpha1/query.ts +++ b/src/protobuf/cosmos/app/v1alpha1/query.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/app/v1alpha1/query.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/auth/module/v1/module.ts b/src/protobuf/cosmos/auth/module/v1/module.ts index a4ac05f2..2cab56f3 100644 --- a/src/protobuf/cosmos/auth/module/v1/module.ts +++ b/src/protobuf/cosmos/auth/module/v1/module.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/auth/module/v1/module.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/auth/v1beta1/auth.ts b/src/protobuf/cosmos/auth/v1beta1/auth.ts index a74ea3a7..193c903c 100644 --- a/src/protobuf/cosmos/auth/v1beta1/auth.ts +++ b/src/protobuf/cosmos/auth/v1beta1/auth.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/auth/v1beta1/auth.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/auth/v1beta1/genesis.ts b/src/protobuf/cosmos/auth/v1beta1/genesis.ts index 5d44daf2..40d930f6 100644 --- a/src/protobuf/cosmos/auth/v1beta1/genesis.ts +++ b/src/protobuf/cosmos/auth/v1beta1/genesis.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/auth/v1beta1/genesis.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/auth/v1beta1/query.ts b/src/protobuf/cosmos/auth/v1beta1/query.ts index 1d015b65..850fd6b8 100644 --- a/src/protobuf/cosmos/auth/v1beta1/query.ts +++ b/src/protobuf/cosmos/auth/v1beta1/query.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/auth/v1beta1/query.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/auth/v1beta1/tx.ts b/src/protobuf/cosmos/auth/v1beta1/tx.ts index a70c7e10..b0a9e8a0 100644 --- a/src/protobuf/cosmos/auth/v1beta1/tx.ts +++ b/src/protobuf/cosmos/auth/v1beta1/tx.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/auth/v1beta1/tx.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/authz/module/v1/module.ts b/src/protobuf/cosmos/authz/module/v1/module.ts index bb1a5944..55928dae 100644 --- a/src/protobuf/cosmos/authz/module/v1/module.ts +++ b/src/protobuf/cosmos/authz/module/v1/module.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/authz/module/v1/module.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/authz/v1beta1/authz.ts b/src/protobuf/cosmos/authz/v1beta1/authz.ts index c880a78c..cbfbfe76 100644 --- a/src/protobuf/cosmos/authz/v1beta1/authz.ts +++ b/src/protobuf/cosmos/authz/v1beta1/authz.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/authz/v1beta1/authz.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/authz/v1beta1/event.ts b/src/protobuf/cosmos/authz/v1beta1/event.ts index e8c368cb..688b5348 100644 --- a/src/protobuf/cosmos/authz/v1beta1/event.ts +++ b/src/protobuf/cosmos/authz/v1beta1/event.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/authz/v1beta1/event.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/authz/v1beta1/genesis.ts b/src/protobuf/cosmos/authz/v1beta1/genesis.ts index bee531b3..9bc9c4c2 100644 --- a/src/protobuf/cosmos/authz/v1beta1/genesis.ts +++ b/src/protobuf/cosmos/authz/v1beta1/genesis.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/authz/v1beta1/genesis.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/authz/v1beta1/query.ts b/src/protobuf/cosmos/authz/v1beta1/query.ts index f283f15c..2e851af6 100644 --- a/src/protobuf/cosmos/authz/v1beta1/query.ts +++ b/src/protobuf/cosmos/authz/v1beta1/query.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/authz/v1beta1/query.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/authz/v1beta1/tx.ts b/src/protobuf/cosmos/authz/v1beta1/tx.ts index bbe74f77..1fe85179 100644 --- a/src/protobuf/cosmos/authz/v1beta1/tx.ts +++ b/src/protobuf/cosmos/authz/v1beta1/tx.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/authz/v1beta1/tx.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/autocli/v1/options.ts b/src/protobuf/cosmos/autocli/v1/options.ts index 3035a039..39f0efaa 100644 --- a/src/protobuf/cosmos/autocli/v1/options.ts +++ b/src/protobuf/cosmos/autocli/v1/options.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/autocli/v1/options.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/autocli/v1/query.ts b/src/protobuf/cosmos/autocli/v1/query.ts index 37c33826..30749a0b 100644 --- a/src/protobuf/cosmos/autocli/v1/query.ts +++ b/src/protobuf/cosmos/autocli/v1/query.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/autocli/v1/query.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/bank/module/v1/module.ts b/src/protobuf/cosmos/bank/module/v1/module.ts index 8ad7f9a9..a5466322 100644 --- a/src/protobuf/cosmos/bank/module/v1/module.ts +++ b/src/protobuf/cosmos/bank/module/v1/module.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/bank/module/v1/module.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/bank/v1beta1/authz.ts b/src/protobuf/cosmos/bank/v1beta1/authz.ts index c86b809b..9ee918ba 100644 --- a/src/protobuf/cosmos/bank/v1beta1/authz.ts +++ b/src/protobuf/cosmos/bank/v1beta1/authz.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/bank/v1beta1/authz.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/bank/v1beta1/bank.ts b/src/protobuf/cosmos/bank/v1beta1/bank.ts index 8b4f7f41..c49895e8 100644 --- a/src/protobuf/cosmos/bank/v1beta1/bank.ts +++ b/src/protobuf/cosmos/bank/v1beta1/bank.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/bank/v1beta1/bank.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/bank/v1beta1/genesis.ts b/src/protobuf/cosmos/bank/v1beta1/genesis.ts index 77323744..a59a1c32 100644 --- a/src/protobuf/cosmos/bank/v1beta1/genesis.ts +++ b/src/protobuf/cosmos/bank/v1beta1/genesis.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/bank/v1beta1/genesis.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/bank/v1beta1/query.ts b/src/protobuf/cosmos/bank/v1beta1/query.ts index 722bef7d..469b589b 100644 --- a/src/protobuf/cosmos/bank/v1beta1/query.ts +++ b/src/protobuf/cosmos/bank/v1beta1/query.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/bank/v1beta1/query.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/bank/v1beta1/tx.ts b/src/protobuf/cosmos/bank/v1beta1/tx.ts index 16a7a91a..d8c3f9e5 100644 --- a/src/protobuf/cosmos/bank/v1beta1/tx.ts +++ b/src/protobuf/cosmos/bank/v1beta1/tx.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/bank/v1beta1/tx.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/base/abci/v1beta1/abci.ts b/src/protobuf/cosmos/base/abci/v1beta1/abci.ts index 129f2a57..fe3ece6f 100644 --- a/src/protobuf/cosmos/base/abci/v1beta1/abci.ts +++ b/src/protobuf/cosmos/base/abci/v1beta1/abci.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/base/abci/v1beta1/abci.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/base/node/v1beta1/query.ts b/src/protobuf/cosmos/base/node/v1beta1/query.ts index 435e81de..8dbb87b5 100644 --- a/src/protobuf/cosmos/base/node/v1beta1/query.ts +++ b/src/protobuf/cosmos/base/node/v1beta1/query.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/base/node/v1beta1/query.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/base/query/v1beta1/pagination.ts b/src/protobuf/cosmos/base/query/v1beta1/pagination.ts index 08d9110e..fb2188a2 100644 --- a/src/protobuf/cosmos/base/query/v1beta1/pagination.ts +++ b/src/protobuf/cosmos/base/query/v1beta1/pagination.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/base/query/v1beta1/pagination.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/base/reflection/v1beta1/reflection.ts b/src/protobuf/cosmos/base/reflection/v1beta1/reflection.ts index c04c14fe..3d1f5385 100644 --- a/src/protobuf/cosmos/base/reflection/v1beta1/reflection.ts +++ b/src/protobuf/cosmos/base/reflection/v1beta1/reflection.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/base/reflection/v1beta1/reflection.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/base/reflection/v2alpha1/reflection.ts b/src/protobuf/cosmos/base/reflection/v2alpha1/reflection.ts index 929bba23..718216f6 100644 --- a/src/protobuf/cosmos/base/reflection/v2alpha1/reflection.ts +++ b/src/protobuf/cosmos/base/reflection/v2alpha1/reflection.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/base/reflection/v2alpha1/reflection.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/base/tendermint/v1beta1/query.ts b/src/protobuf/cosmos/base/tendermint/v1beta1/query.ts index b910e427..154726fd 100644 --- a/src/protobuf/cosmos/base/tendermint/v1beta1/query.ts +++ b/src/protobuf/cosmos/base/tendermint/v1beta1/query.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/base/tendermint/v1beta1/query.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/base/tendermint/v1beta1/types.ts b/src/protobuf/cosmos/base/tendermint/v1beta1/types.ts index 0faf2488..333424b3 100644 --- a/src/protobuf/cosmos/base/tendermint/v1beta1/types.ts +++ b/src/protobuf/cosmos/base/tendermint/v1beta1/types.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/base/tendermint/v1beta1/types.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/base/v1beta1/coin.ts b/src/protobuf/cosmos/base/v1beta1/coin.ts index 9542bb36..749e63bb 100644 --- a/src/protobuf/cosmos/base/v1beta1/coin.ts +++ b/src/protobuf/cosmos/base/v1beta1/coin.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/base/v1beta1/coin.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/circuit/module/v1/module.ts b/src/protobuf/cosmos/circuit/module/v1/module.ts deleted file mode 100644 index 1459525a..00000000 --- a/src/protobuf/cosmos/circuit/module/v1/module.ts +++ /dev/null @@ -1,85 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 -// source: cosmos/circuit/module/v1/module.proto - -/* eslint-disable */ -import * as _m0 from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.circuit.module.v1"; - -/** Module is the config object of the circuit module. */ -export interface Module { - /** authority defines the custom module authority. If not set, defaults to the governance module. */ - authority: string; -} - -function createBaseModule(): Module { - return { authority: "" }; -} - -export const Module = { - encode(message: Module, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.authority !== "") { - writer.uint32(10).string(message.authority); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Module { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseModule(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.authority = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): Module { - return { authority: isSet(object.authority) ? globalThis.String(object.authority) : "" }; - }, - - toJSON(message: Module): unknown { - const obj: any = {}; - if (message.authority !== "") { - obj.authority = message.authority; - } - return obj; - }, - - create(base?: DeepPartial): Module { - return Module.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): Module { - const message = createBaseModule(); - message.authority = object.authority ?? ""; - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin ? T - : T extends globalThis.Array ? globalThis.Array> - : T extends ReadonlyArray ? ReadonlyArray> - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/protobuf/cosmos/circuit/v1/query.ts b/src/protobuf/cosmos/circuit/v1/query.ts deleted file mode 100644 index d7561a19..00000000 --- a/src/protobuf/cosmos/circuit/v1/query.ts +++ /dev/null @@ -1,457 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 -// source: cosmos/circuit/v1/query.proto - -/* eslint-disable */ -import * as _m0 from "protobufjs/minimal"; -import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; -import { GenesisAccountPermissions, Permissions } from "./types"; - -export const protobufPackage = "cosmos.circuit.v1"; - -/** QueryAccountRequest is the request type for the Query/Account RPC method. */ -export interface QueryAccountRequest { - address: string; -} - -/** AccountResponse is the response type for the Query/Account RPC method. */ -export interface AccountResponse { - permission?: Permissions | undefined; -} - -/** QueryAccountsRequest is the request type for the Query/Accounts RPC method. */ -export interface QueryAccountsRequest { - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequest | undefined; -} - -/** AccountsResponse is the response type for the Query/Accounts RPC method. */ -export interface AccountsResponse { - accounts: GenesisAccountPermissions[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponse | undefined; -} - -/** QueryDisableListRequest is the request type for the Query/DisabledList RPC method. */ -export interface QueryDisabledListRequest { -} - -/** DisabledListResponse is the response type for the Query/DisabledList RPC method. */ -export interface DisabledListResponse { - disabled_list: string[]; -} - -function createBaseQueryAccountRequest(): QueryAccountRequest { - return { address: "" }; -} - -export const QueryAccountRequest = { - encode(message: QueryAccountRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryAccountRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryAccountRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.address = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryAccountRequest { - return { address: isSet(object.address) ? globalThis.String(object.address) : "" }; - }, - - toJSON(message: QueryAccountRequest): unknown { - const obj: any = {}; - if (message.address !== "") { - obj.address = message.address; - } - return obj; - }, - - create(base?: DeepPartial): QueryAccountRequest { - return QueryAccountRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryAccountRequest { - const message = createBaseQueryAccountRequest(); - message.address = object.address ?? ""; - return message; - }, -}; - -function createBaseAccountResponse(): AccountResponse { - return { permission: undefined }; -} - -export const AccountResponse = { - encode(message: AccountResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.permission !== undefined) { - Permissions.encode(message.permission, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): AccountResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAccountResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.permission = Permissions.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): AccountResponse { - return { permission: isSet(object.permission) ? Permissions.fromJSON(object.permission) : undefined }; - }, - - toJSON(message: AccountResponse): unknown { - const obj: any = {}; - if (message.permission !== undefined) { - obj.permission = Permissions.toJSON(message.permission); - } - return obj; - }, - - create(base?: DeepPartial): AccountResponse { - return AccountResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): AccountResponse { - const message = createBaseAccountResponse(); - message.permission = (object.permission !== undefined && object.permission !== null) - ? Permissions.fromPartial(object.permission) - : undefined; - return message; - }, -}; - -function createBaseQueryAccountsRequest(): QueryAccountsRequest { - return { pagination: undefined }; -} - -export const QueryAccountsRequest = { - encode(message: QueryAccountsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryAccountsRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryAccountsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.pagination = PageRequest.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryAccountsRequest { - return { pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; - }, - - toJSON(message: QueryAccountsRequest): unknown { - const obj: any = {}; - if (message.pagination !== undefined) { - obj.pagination = PageRequest.toJSON(message.pagination); - } - return obj; - }, - - create(base?: DeepPartial): QueryAccountsRequest { - return QueryAccountsRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryAccountsRequest { - const message = createBaseQueryAccountsRequest(); - message.pagination = (object.pagination !== undefined && object.pagination !== null) - ? PageRequest.fromPartial(object.pagination) - : undefined; - return message; - }, -}; - -function createBaseAccountsResponse(): AccountsResponse { - return { accounts: [], pagination: undefined }; -} - -export const AccountsResponse = { - encode(message: AccountsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.accounts) { - GenesisAccountPermissions.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): AccountsResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAccountsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.accounts.push(GenesisAccountPermissions.decode(reader, reader.uint32())); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.pagination = PageResponse.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): AccountsResponse { - return { - accounts: globalThis.Array.isArray(object?.accounts) - ? object.accounts.map((e: any) => GenesisAccountPermissions.fromJSON(e)) - : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, - }; - }, - - toJSON(message: AccountsResponse): unknown { - const obj: any = {}; - if (message.accounts?.length) { - obj.accounts = message.accounts.map((e) => GenesisAccountPermissions.toJSON(e)); - } - if (message.pagination !== undefined) { - obj.pagination = PageResponse.toJSON(message.pagination); - } - return obj; - }, - - create(base?: DeepPartial): AccountsResponse { - return AccountsResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): AccountsResponse { - const message = createBaseAccountsResponse(); - message.accounts = object.accounts?.map((e) => GenesisAccountPermissions.fromPartial(e)) || []; - message.pagination = (object.pagination !== undefined && object.pagination !== null) - ? PageResponse.fromPartial(object.pagination) - : undefined; - return message; - }, -}; - -function createBaseQueryDisabledListRequest(): QueryDisabledListRequest { - return {}; -} - -export const QueryDisabledListRequest = { - encode(_: QueryDisabledListRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryDisabledListRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryDisabledListRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(_: any): QueryDisabledListRequest { - return {}; - }, - - toJSON(_: QueryDisabledListRequest): unknown { - const obj: any = {}; - return obj; - }, - - create(base?: DeepPartial): QueryDisabledListRequest { - return QueryDisabledListRequest.fromPartial(base ?? {}); - }, - fromPartial(_: DeepPartial): QueryDisabledListRequest { - const message = createBaseQueryDisabledListRequest(); - return message; - }, -}; - -function createBaseDisabledListResponse(): DisabledListResponse { - return { disabled_list: [] }; -} - -export const DisabledListResponse = { - encode(message: DisabledListResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.disabled_list) { - writer.uint32(10).string(v!); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): DisabledListResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDisabledListResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.disabled_list.push(reader.string()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): DisabledListResponse { - return { - disabled_list: globalThis.Array.isArray(object?.disabled_list) - ? object.disabled_list.map((e: any) => globalThis.String(e)) - : [], - }; - }, - - toJSON(message: DisabledListResponse): unknown { - const obj: any = {}; - if (message.disabled_list?.length) { - obj.disabled_list = message.disabled_list; - } - return obj; - }, - - create(base?: DeepPartial): DisabledListResponse { - return DisabledListResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): DisabledListResponse { - const message = createBaseDisabledListResponse(); - message.disabled_list = object.disabled_list?.map((e) => e) || []; - return message; - }, -}; - -/** Query defines the circuit gRPC querier service. */ -export interface Query { - /** Account returns account permissions. */ - Account(request: QueryAccountRequest): Promise; - /** Account returns account permissions. */ - Accounts(request: QueryAccountsRequest): Promise; - /** DisabledList returns a list of disabled message urls */ - DisabledList(request: QueryDisabledListRequest): Promise; -} - -export const QueryServiceName = "cosmos.circuit.v1.Query"; -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - private readonly service: string; - constructor(rpc: Rpc, opts?: { service?: string }) { - this.service = opts?.service || QueryServiceName; - this.rpc = rpc; - this.Account = this.Account.bind(this); - this.Accounts = this.Accounts.bind(this); - this.DisabledList = this.DisabledList.bind(this); - } - Account(request: QueryAccountRequest): Promise { - const data = QueryAccountRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, "Account", data); - return promise.then((data) => AccountResponse.decode(_m0.Reader.create(data))); - } - - Accounts(request: QueryAccountsRequest): Promise { - const data = QueryAccountsRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, "Accounts", data); - return promise.then((data) => AccountsResponse.decode(_m0.Reader.create(data))); - } - - DisabledList(request: QueryDisabledListRequest): Promise { - const data = QueryDisabledListRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, "DisabledList", data); - return promise.then((data) => DisabledListResponse.decode(_m0.Reader.create(data))); - } -} - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin ? T - : T extends globalThis.Array ? globalThis.Array> - : T extends ReadonlyArray ? ReadonlyArray> - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/protobuf/cosmos/circuit/v1/tx.ts b/src/protobuf/cosmos/circuit/v1/tx.ts deleted file mode 100644 index 03a5d5a3..00000000 --- a/src/protobuf/cosmos/circuit/v1/tx.ts +++ /dev/null @@ -1,545 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 -// source: cosmos/circuit/v1/tx.proto - -/* eslint-disable */ -import * as _m0 from "protobufjs/minimal"; -import { Permissions } from "./types"; - -export const protobufPackage = "cosmos.circuit.v1"; - -/** MsgAuthorizeCircuitBreaker defines the Msg/AuthorizeCircuitBreaker request type. */ -export interface MsgAuthorizeCircuitBreaker { - /** - * granter is the granter of the circuit breaker permissions and must have - * LEVEL_SUPER_ADMIN. - */ - granter: string; - /** grantee is the account authorized with the provided permissions. */ - grantee: string; - /** - * 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. - */ - permissions?: Permissions | undefined; -} - -/** MsgAuthorizeCircuitBreakerResponse defines the Msg/AuthorizeCircuitBreaker response type. */ -export interface MsgAuthorizeCircuitBreakerResponse { - success: boolean; -} - -/** MsgTripCircuitBreaker defines the Msg/TripCircuitBreaker request type. */ -export interface MsgTripCircuitBreaker { - /** authority is the account authorized to trip the circuit breaker. */ - authority: string; - /** - * 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. - */ - msg_type_urls: string[]; -} - -/** MsgTripCircuitBreakerResponse defines the Msg/TripCircuitBreaker response type. */ -export interface MsgTripCircuitBreakerResponse { - success: boolean; -} - -/** MsgResetCircuitBreaker defines the Msg/ResetCircuitBreaker request type. */ -export interface MsgResetCircuitBreaker { - /** authority is the account authorized to trip or reset the circuit breaker. */ - authority: string; - /** - * 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. - */ - msg_type_urls: string[]; -} - -/** MsgResetCircuitBreakerResponse defines the Msg/ResetCircuitBreaker response type. */ -export interface MsgResetCircuitBreakerResponse { - success: boolean; -} - -function createBaseMsgAuthorizeCircuitBreaker(): MsgAuthorizeCircuitBreaker { - return { granter: "", grantee: "", permissions: undefined }; -} - -export const MsgAuthorizeCircuitBreaker = { - encode(message: MsgAuthorizeCircuitBreaker, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.granter !== "") { - writer.uint32(10).string(message.granter); - } - if (message.grantee !== "") { - writer.uint32(18).string(message.grantee); - } - if (message.permissions !== undefined) { - Permissions.encode(message.permissions, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgAuthorizeCircuitBreaker { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgAuthorizeCircuitBreaker(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.granter = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.grantee = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.permissions = Permissions.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): MsgAuthorizeCircuitBreaker { - return { - granter: isSet(object.granter) ? globalThis.String(object.granter) : "", - grantee: isSet(object.grantee) ? globalThis.String(object.grantee) : "", - permissions: isSet(object.permissions) ? Permissions.fromJSON(object.permissions) : undefined, - }; - }, - - toJSON(message: MsgAuthorizeCircuitBreaker): unknown { - const obj: any = {}; - if (message.granter !== "") { - obj.granter = message.granter; - } - if (message.grantee !== "") { - obj.grantee = message.grantee; - } - if (message.permissions !== undefined) { - obj.permissions = Permissions.toJSON(message.permissions); - } - return obj; - }, - - create(base?: DeepPartial): MsgAuthorizeCircuitBreaker { - return MsgAuthorizeCircuitBreaker.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): MsgAuthorizeCircuitBreaker { - const message = createBaseMsgAuthorizeCircuitBreaker(); - message.granter = object.granter ?? ""; - message.grantee = object.grantee ?? ""; - message.permissions = (object.permissions !== undefined && object.permissions !== null) - ? Permissions.fromPartial(object.permissions) - : undefined; - return message; - }, -}; - -function createBaseMsgAuthorizeCircuitBreakerResponse(): MsgAuthorizeCircuitBreakerResponse { - return { success: false }; -} - -export const MsgAuthorizeCircuitBreakerResponse = { - encode(message: MsgAuthorizeCircuitBreakerResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.success !== false) { - writer.uint32(8).bool(message.success); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgAuthorizeCircuitBreakerResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgAuthorizeCircuitBreakerResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.success = reader.bool(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): MsgAuthorizeCircuitBreakerResponse { - return { success: isSet(object.success) ? globalThis.Boolean(object.success) : false }; - }, - - toJSON(message: MsgAuthorizeCircuitBreakerResponse): unknown { - const obj: any = {}; - if (message.success !== false) { - obj.success = message.success; - } - return obj; - }, - - create(base?: DeepPartial): MsgAuthorizeCircuitBreakerResponse { - return MsgAuthorizeCircuitBreakerResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): MsgAuthorizeCircuitBreakerResponse { - const message = createBaseMsgAuthorizeCircuitBreakerResponse(); - message.success = object.success ?? false; - return message; - }, -}; - -function createBaseMsgTripCircuitBreaker(): MsgTripCircuitBreaker { - return { authority: "", msg_type_urls: [] }; -} - -export const MsgTripCircuitBreaker = { - encode(message: MsgTripCircuitBreaker, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.authority !== "") { - writer.uint32(10).string(message.authority); - } - for (const v of message.msg_type_urls) { - writer.uint32(18).string(v!); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgTripCircuitBreaker { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgTripCircuitBreaker(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.authority = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.msg_type_urls.push(reader.string()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): MsgTripCircuitBreaker { - return { - authority: isSet(object.authority) ? globalThis.String(object.authority) : "", - msg_type_urls: globalThis.Array.isArray(object?.msg_type_urls) - ? object.msg_type_urls.map((e: any) => globalThis.String(e)) - : [], - }; - }, - - toJSON(message: MsgTripCircuitBreaker): unknown { - const obj: any = {}; - if (message.authority !== "") { - obj.authority = message.authority; - } - if (message.msg_type_urls?.length) { - obj.msg_type_urls = message.msg_type_urls; - } - return obj; - }, - - create(base?: DeepPartial): MsgTripCircuitBreaker { - return MsgTripCircuitBreaker.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): MsgTripCircuitBreaker { - const message = createBaseMsgTripCircuitBreaker(); - message.authority = object.authority ?? ""; - message.msg_type_urls = object.msg_type_urls?.map((e) => e) || []; - return message; - }, -}; - -function createBaseMsgTripCircuitBreakerResponse(): MsgTripCircuitBreakerResponse { - return { success: false }; -} - -export const MsgTripCircuitBreakerResponse = { - encode(message: MsgTripCircuitBreakerResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.success !== false) { - writer.uint32(8).bool(message.success); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgTripCircuitBreakerResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgTripCircuitBreakerResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.success = reader.bool(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): MsgTripCircuitBreakerResponse { - return { success: isSet(object.success) ? globalThis.Boolean(object.success) : false }; - }, - - toJSON(message: MsgTripCircuitBreakerResponse): unknown { - const obj: any = {}; - if (message.success !== false) { - obj.success = message.success; - } - return obj; - }, - - create(base?: DeepPartial): MsgTripCircuitBreakerResponse { - return MsgTripCircuitBreakerResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): MsgTripCircuitBreakerResponse { - const message = createBaseMsgTripCircuitBreakerResponse(); - message.success = object.success ?? false; - return message; - }, -}; - -function createBaseMsgResetCircuitBreaker(): MsgResetCircuitBreaker { - return { authority: "", msg_type_urls: [] }; -} - -export const MsgResetCircuitBreaker = { - encode(message: MsgResetCircuitBreaker, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.authority !== "") { - writer.uint32(10).string(message.authority); - } - for (const v of message.msg_type_urls) { - writer.uint32(26).string(v!); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgResetCircuitBreaker { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgResetCircuitBreaker(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.authority = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.msg_type_urls.push(reader.string()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): MsgResetCircuitBreaker { - return { - authority: isSet(object.authority) ? globalThis.String(object.authority) : "", - msg_type_urls: globalThis.Array.isArray(object?.msg_type_urls) - ? object.msg_type_urls.map((e: any) => globalThis.String(e)) - : [], - }; - }, - - toJSON(message: MsgResetCircuitBreaker): unknown { - const obj: any = {}; - if (message.authority !== "") { - obj.authority = message.authority; - } - if (message.msg_type_urls?.length) { - obj.msg_type_urls = message.msg_type_urls; - } - return obj; - }, - - create(base?: DeepPartial): MsgResetCircuitBreaker { - return MsgResetCircuitBreaker.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): MsgResetCircuitBreaker { - const message = createBaseMsgResetCircuitBreaker(); - message.authority = object.authority ?? ""; - message.msg_type_urls = object.msg_type_urls?.map((e) => e) || []; - return message; - }, -}; - -function createBaseMsgResetCircuitBreakerResponse(): MsgResetCircuitBreakerResponse { - return { success: false }; -} - -export const MsgResetCircuitBreakerResponse = { - encode(message: MsgResetCircuitBreakerResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.success !== false) { - writer.uint32(8).bool(message.success); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgResetCircuitBreakerResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgResetCircuitBreakerResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.success = reader.bool(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): MsgResetCircuitBreakerResponse { - return { success: isSet(object.success) ? globalThis.Boolean(object.success) : false }; - }, - - toJSON(message: MsgResetCircuitBreakerResponse): unknown { - const obj: any = {}; - if (message.success !== false) { - obj.success = message.success; - } - return obj; - }, - - create(base?: DeepPartial): MsgResetCircuitBreakerResponse { - return MsgResetCircuitBreakerResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): MsgResetCircuitBreakerResponse { - const message = createBaseMsgResetCircuitBreakerResponse(); - message.success = object.success ?? false; - return message; - }, -}; - -/** Msg defines the circuit Msg service. */ -export interface Msg { - /** - * AuthorizeCircuitBreaker allows a super-admin to grant (or revoke) another - * account's circuit breaker permissions. - */ - AuthorizeCircuitBreaker(request: MsgAuthorizeCircuitBreaker): Promise; - /** TripCircuitBreaker pauses processing of Msg's in the state machine. */ - TripCircuitBreaker(request: MsgTripCircuitBreaker): Promise; - /** - * ResetCircuitBreaker resumes processing of Msg's in the state machine that - * have been been paused using TripCircuitBreaker. - */ - ResetCircuitBreaker(request: MsgResetCircuitBreaker): Promise; -} - -export const MsgServiceName = "cosmos.circuit.v1.Msg"; -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - private readonly service: string; - constructor(rpc: Rpc, opts?: { service?: string }) { - this.service = opts?.service || MsgServiceName; - this.rpc = rpc; - this.AuthorizeCircuitBreaker = this.AuthorizeCircuitBreaker.bind(this); - this.TripCircuitBreaker = this.TripCircuitBreaker.bind(this); - this.ResetCircuitBreaker = this.ResetCircuitBreaker.bind(this); - } - AuthorizeCircuitBreaker(request: MsgAuthorizeCircuitBreaker): Promise { - const data = MsgAuthorizeCircuitBreaker.encode(request).finish(); - const promise = this.rpc.request(this.service, "AuthorizeCircuitBreaker", data); - return promise.then((data) => MsgAuthorizeCircuitBreakerResponse.decode(_m0.Reader.create(data))); - } - - TripCircuitBreaker(request: MsgTripCircuitBreaker): Promise { - const data = MsgTripCircuitBreaker.encode(request).finish(); - const promise = this.rpc.request(this.service, "TripCircuitBreaker", data); - return promise.then((data) => MsgTripCircuitBreakerResponse.decode(_m0.Reader.create(data))); - } - - ResetCircuitBreaker(request: MsgResetCircuitBreaker): Promise { - const data = MsgResetCircuitBreaker.encode(request).finish(); - const promise = this.rpc.request(this.service, "ResetCircuitBreaker", data); - return promise.then((data) => MsgResetCircuitBreakerResponse.decode(_m0.Reader.create(data))); - } -} - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin ? T - : T extends globalThis.Array ? globalThis.Array> - : T extends ReadonlyArray ? ReadonlyArray> - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/protobuf/cosmos/circuit/v1/types.ts b/src/protobuf/cosmos/circuit/v1/types.ts deleted file mode 100644 index e6d9e040..00000000 --- a/src/protobuf/cosmos/circuit/v1/types.ts +++ /dev/null @@ -1,344 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 -// source: cosmos/circuit/v1/types.proto - -/* eslint-disable */ -import * as _m0 from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.circuit.v1"; - -/** - * Permissions are the permissions that an account has to trip - * or reset the circuit breaker. - */ -export interface Permissions { - /** level is the level of permissions granted to this account. */ - level: Permissions_Level; - /** - * 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. - */ - limit_type_urls: string[]; -} - -/** Level is the permission level. */ -export enum Permissions_Level { - /** - * LEVEL_NONE_UNSPECIFIED - LEVEL_NONE_UNSPECIFIED indicates that the account will have no circuit - * breaker permissions. - */ - LEVEL_NONE_UNSPECIFIED = 0, - /** - * 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_SOME_MSGS = 1, - /** - * 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_ALL_MSGS = 2, - /** - * LEVEL_SUPER_ADMIN - LEVEL_SUPER_ADMIN indicates that the account can take all circuit breaker - * actions and can grant permissions to other accounts. - */ - LEVEL_SUPER_ADMIN = 3, - UNRECOGNIZED = -1, -} - -export function permissions_LevelFromJSON(object: any): Permissions_Level { - switch (object) { - case 0: - case "LEVEL_NONE_UNSPECIFIED": - return Permissions_Level.LEVEL_NONE_UNSPECIFIED; - case 1: - case "LEVEL_SOME_MSGS": - return Permissions_Level.LEVEL_SOME_MSGS; - case 2: - case "LEVEL_ALL_MSGS": - return Permissions_Level.LEVEL_ALL_MSGS; - case 3: - case "LEVEL_SUPER_ADMIN": - return Permissions_Level.LEVEL_SUPER_ADMIN; - case -1: - case "UNRECOGNIZED": - default: - return Permissions_Level.UNRECOGNIZED; - } -} - -export function permissions_LevelToJSON(object: Permissions_Level): string { - switch (object) { - case Permissions_Level.LEVEL_NONE_UNSPECIFIED: - return "LEVEL_NONE_UNSPECIFIED"; - case Permissions_Level.LEVEL_SOME_MSGS: - return "LEVEL_SOME_MSGS"; - case Permissions_Level.LEVEL_ALL_MSGS: - return "LEVEL_ALL_MSGS"; - case Permissions_Level.LEVEL_SUPER_ADMIN: - return "LEVEL_SUPER_ADMIN"; - case Permissions_Level.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -/** GenesisAccountPermissions is the account permissions for the circuit breaker in genesis */ -export interface GenesisAccountPermissions { - address: string; - permissions?: Permissions | undefined; -} - -/** GenesisState is the state that must be provided at genesis. */ -export interface GenesisState { - account_permissions: GenesisAccountPermissions[]; - disabled_type_urls: string[]; -} - -function createBasePermissions(): Permissions { - return { level: 0, limit_type_urls: [] }; -} - -export const Permissions = { - encode(message: Permissions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.level !== 0) { - writer.uint32(8).int32(message.level); - } - for (const v of message.limit_type_urls) { - writer.uint32(18).string(v!); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Permissions { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePermissions(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.level = reader.int32() as any; - continue; - case 2: - if (tag !== 18) { - break; - } - - message.limit_type_urls.push(reader.string()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): Permissions { - return { - level: isSet(object.level) ? permissions_LevelFromJSON(object.level) : 0, - limit_type_urls: globalThis.Array.isArray(object?.limit_type_urls) - ? object.limit_type_urls.map((e: any) => globalThis.String(e)) - : [], - }; - }, - - toJSON(message: Permissions): unknown { - const obj: any = {}; - if (message.level !== 0) { - obj.level = permissions_LevelToJSON(message.level); - } - if (message.limit_type_urls?.length) { - obj.limit_type_urls = message.limit_type_urls; - } - return obj; - }, - - create(base?: DeepPartial): Permissions { - return Permissions.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): Permissions { - const message = createBasePermissions(); - message.level = object.level ?? 0; - message.limit_type_urls = object.limit_type_urls?.map((e) => e) || []; - return message; - }, -}; - -function createBaseGenesisAccountPermissions(): GenesisAccountPermissions { - return { address: "", permissions: undefined }; -} - -export const GenesisAccountPermissions = { - encode(message: GenesisAccountPermissions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.permissions !== undefined) { - Permissions.encode(message.permissions, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): GenesisAccountPermissions { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisAccountPermissions(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.address = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.permissions = Permissions.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): GenesisAccountPermissions { - return { - address: isSet(object.address) ? globalThis.String(object.address) : "", - permissions: isSet(object.permissions) ? Permissions.fromJSON(object.permissions) : undefined, - }; - }, - - toJSON(message: GenesisAccountPermissions): unknown { - const obj: any = {}; - if (message.address !== "") { - obj.address = message.address; - } - if (message.permissions !== undefined) { - obj.permissions = Permissions.toJSON(message.permissions); - } - return obj; - }, - - create(base?: DeepPartial): GenesisAccountPermissions { - return GenesisAccountPermissions.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): GenesisAccountPermissions { - const message = createBaseGenesisAccountPermissions(); - message.address = object.address ?? ""; - message.permissions = (object.permissions !== undefined && object.permissions !== null) - ? Permissions.fromPartial(object.permissions) - : undefined; - return message; - }, -}; - -function createBaseGenesisState(): GenesisState { - return { account_permissions: [], disabled_type_urls: [] }; -} - -export const GenesisState = { - encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.account_permissions) { - GenesisAccountPermissions.encode(v!, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.disabled_type_urls) { - writer.uint32(18).string(v!); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.account_permissions.push(GenesisAccountPermissions.decode(reader, reader.uint32())); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.disabled_type_urls.push(reader.string()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): GenesisState { - return { - account_permissions: globalThis.Array.isArray(object?.account_permissions) - ? object.account_permissions.map((e: any) => GenesisAccountPermissions.fromJSON(e)) - : [], - disabled_type_urls: globalThis.Array.isArray(object?.disabled_type_urls) - ? object.disabled_type_urls.map((e: any) => globalThis.String(e)) - : [], - }; - }, - - toJSON(message: GenesisState): unknown { - const obj: any = {}; - if (message.account_permissions?.length) { - obj.account_permissions = message.account_permissions.map((e) => GenesisAccountPermissions.toJSON(e)); - } - if (message.disabled_type_urls?.length) { - obj.disabled_type_urls = message.disabled_type_urls; - } - return obj; - }, - - create(base?: DeepPartial): GenesisState { - return GenesisState.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): GenesisState { - const message = createBaseGenesisState(); - message.account_permissions = object.account_permissions?.map((e) => GenesisAccountPermissions.fromPartial(e)) || - []; - message.disabled_type_urls = object.disabled_type_urls?.map((e) => e) || []; - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin ? T - : T extends globalThis.Array ? globalThis.Array> - : T extends ReadonlyArray ? ReadonlyArray> - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/protobuf/cosmos/consensus/module/v1/module.ts b/src/protobuf/cosmos/consensus/module/v1/module.ts index 601d995f..758cc029 100644 --- a/src/protobuf/cosmos/consensus/module/v1/module.ts +++ b/src/protobuf/cosmos/consensus/module/v1/module.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/consensus/module/v1/module.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/consensus/v1/query.ts b/src/protobuf/cosmos/consensus/v1/query.ts index 979b2416..c114e2f7 100644 --- a/src/protobuf/cosmos/consensus/v1/query.ts +++ b/src/protobuf/cosmos/consensus/v1/query.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/consensus/v1/query.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/consensus/v1/tx.ts b/src/protobuf/cosmos/consensus/v1/tx.ts index 75d76d56..c3a0b1f6 100644 --- a/src/protobuf/cosmos/consensus/v1/tx.ts +++ b/src/protobuf/cosmos/consensus/v1/tx.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/consensus/v1/tx.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/crisis/module/v1/module.ts b/src/protobuf/cosmos/crisis/module/v1/module.ts index 7353cc02..581a4026 100644 --- a/src/protobuf/cosmos/crisis/module/v1/module.ts +++ b/src/protobuf/cosmos/crisis/module/v1/module.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/crisis/module/v1/module.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/crisis/v1beta1/genesis.ts b/src/protobuf/cosmos/crisis/v1beta1/genesis.ts index 233e1a39..0c2141fe 100644 --- a/src/protobuf/cosmos/crisis/v1beta1/genesis.ts +++ b/src/protobuf/cosmos/crisis/v1beta1/genesis.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/crisis/v1beta1/genesis.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/crisis/v1beta1/tx.ts b/src/protobuf/cosmos/crisis/v1beta1/tx.ts index 4f2dcf74..1073d080 100644 --- a/src/protobuf/cosmos/crisis/v1beta1/tx.ts +++ b/src/protobuf/cosmos/crisis/v1beta1/tx.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/crisis/v1beta1/tx.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/crypto/ed25519/keys.ts b/src/protobuf/cosmos/crypto/ed25519/keys.ts index e16d2bc7..5bcd0b89 100644 --- a/src/protobuf/cosmos/crypto/ed25519/keys.ts +++ b/src/protobuf/cosmos/crypto/ed25519/keys.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/crypto/ed25519/keys.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/crypto/hd/v1/hd.ts b/src/protobuf/cosmos/crypto/hd/v1/hd.ts index 042d5d8c..7f7a071f 100644 --- a/src/protobuf/cosmos/crypto/hd/v1/hd.ts +++ b/src/protobuf/cosmos/crypto/hd/v1/hd.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/crypto/hd/v1/hd.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/crypto/keyring/v1/record.ts b/src/protobuf/cosmos/crypto/keyring/v1/record.ts index 25aedd8c..63fc4a20 100644 --- a/src/protobuf/cosmos/crypto/keyring/v1/record.ts +++ b/src/protobuf/cosmos/crypto/keyring/v1/record.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/crypto/keyring/v1/record.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/crypto/multisig/keys.ts b/src/protobuf/cosmos/crypto/multisig/keys.ts index 40552e8e..05f78ae8 100644 --- a/src/protobuf/cosmos/crypto/multisig/keys.ts +++ b/src/protobuf/cosmos/crypto/multisig/keys.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/crypto/multisig/keys.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/crypto/multisig/v1beta1/multisig.ts b/src/protobuf/cosmos/crypto/multisig/v1beta1/multisig.ts index 513edb7e..4371a4f9 100644 --- a/src/protobuf/cosmos/crypto/multisig/v1beta1/multisig.ts +++ b/src/protobuf/cosmos/crypto/multisig/v1beta1/multisig.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/crypto/multisig/v1beta1/multisig.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/crypto/secp256k1/keys.ts b/src/protobuf/cosmos/crypto/secp256k1/keys.ts index 574bbd01..de100c06 100644 --- a/src/protobuf/cosmos/crypto/secp256k1/keys.ts +++ b/src/protobuf/cosmos/crypto/secp256k1/keys.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/crypto/secp256k1/keys.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/crypto/secp256r1/keys.ts b/src/protobuf/cosmos/crypto/secp256r1/keys.ts index f43e79fb..6bd4bf22 100644 --- a/src/protobuf/cosmos/crypto/secp256r1/keys.ts +++ b/src/protobuf/cosmos/crypto/secp256r1/keys.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/crypto/secp256r1/keys.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/distribution/module/v1/module.ts b/src/protobuf/cosmos/distribution/module/v1/module.ts index a9a0b48c..37865074 100644 --- a/src/protobuf/cosmos/distribution/module/v1/module.ts +++ b/src/protobuf/cosmos/distribution/module/v1/module.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/distribution/module/v1/module.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/distribution/v1beta1/distribution.ts b/src/protobuf/cosmos/distribution/v1beta1/distribution.ts index e2c6f115..6a6d6d63 100644 --- a/src/protobuf/cosmos/distribution/v1beta1/distribution.ts +++ b/src/protobuf/cosmos/distribution/v1beta1/distribution.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/distribution/v1beta1/distribution.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/distribution/v1beta1/genesis.ts b/src/protobuf/cosmos/distribution/v1beta1/genesis.ts index 7fe78df1..e6720e9b 100644 --- a/src/protobuf/cosmos/distribution/v1beta1/genesis.ts +++ b/src/protobuf/cosmos/distribution/v1beta1/genesis.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/distribution/v1beta1/genesis.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/distribution/v1beta1/query.ts b/src/protobuf/cosmos/distribution/v1beta1/query.ts index 652042cb..7c7615a3 100644 --- a/src/protobuf/cosmos/distribution/v1beta1/query.ts +++ b/src/protobuf/cosmos/distribution/v1beta1/query.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/distribution/v1beta1/query.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/distribution/v1beta1/tx.ts b/src/protobuf/cosmos/distribution/v1beta1/tx.ts index 77f5b0b0..a35b9c41 100644 --- a/src/protobuf/cosmos/distribution/v1beta1/tx.ts +++ b/src/protobuf/cosmos/distribution/v1beta1/tx.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/distribution/v1beta1/tx.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/evidence/module/v1/module.ts b/src/protobuf/cosmos/evidence/module/v1/module.ts index aef352e0..f1075772 100644 --- a/src/protobuf/cosmos/evidence/module/v1/module.ts +++ b/src/protobuf/cosmos/evidence/module/v1/module.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/evidence/module/v1/module.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/evidence/v1beta1/evidence.ts b/src/protobuf/cosmos/evidence/v1beta1/evidence.ts index 4be4c75f..1c009ddb 100644 --- a/src/protobuf/cosmos/evidence/v1beta1/evidence.ts +++ b/src/protobuf/cosmos/evidence/v1beta1/evidence.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/evidence/v1beta1/evidence.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/evidence/v1beta1/genesis.ts b/src/protobuf/cosmos/evidence/v1beta1/genesis.ts index 3e3ac5c5..274d0b3f 100644 --- a/src/protobuf/cosmos/evidence/v1beta1/genesis.ts +++ b/src/protobuf/cosmos/evidence/v1beta1/genesis.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/evidence/v1beta1/genesis.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/evidence/v1beta1/query.ts b/src/protobuf/cosmos/evidence/v1beta1/query.ts index 7180e4ec..34f583e7 100644 --- a/src/protobuf/cosmos/evidence/v1beta1/query.ts +++ b/src/protobuf/cosmos/evidence/v1beta1/query.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/evidence/v1beta1/query.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/evidence/v1beta1/tx.ts b/src/protobuf/cosmos/evidence/v1beta1/tx.ts index 7ee4d8b4..73c60452 100644 --- a/src/protobuf/cosmos/evidence/v1beta1/tx.ts +++ b/src/protobuf/cosmos/evidence/v1beta1/tx.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/evidence/v1beta1/tx.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/feegrant/module/v1/module.ts b/src/protobuf/cosmos/feegrant/module/v1/module.ts index b5793b40..c6682bd6 100644 --- a/src/protobuf/cosmos/feegrant/module/v1/module.ts +++ b/src/protobuf/cosmos/feegrant/module/v1/module.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/feegrant/module/v1/module.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/feegrant/v1beta1/feegrant.ts b/src/protobuf/cosmos/feegrant/v1beta1/feegrant.ts index f0274413..ddd4f747 100644 --- a/src/protobuf/cosmos/feegrant/v1beta1/feegrant.ts +++ b/src/protobuf/cosmos/feegrant/v1beta1/feegrant.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/feegrant/v1beta1/feegrant.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/feegrant/v1beta1/genesis.ts b/src/protobuf/cosmos/feegrant/v1beta1/genesis.ts index 74bb29c3..d6fe86f6 100644 --- a/src/protobuf/cosmos/feegrant/v1beta1/genesis.ts +++ b/src/protobuf/cosmos/feegrant/v1beta1/genesis.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/feegrant/v1beta1/genesis.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/feegrant/v1beta1/query.ts b/src/protobuf/cosmos/feegrant/v1beta1/query.ts index 45e4327c..245adcb5 100644 --- a/src/protobuf/cosmos/feegrant/v1beta1/query.ts +++ b/src/protobuf/cosmos/feegrant/v1beta1/query.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/feegrant/v1beta1/query.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/feegrant/v1beta1/tx.ts b/src/protobuf/cosmos/feegrant/v1beta1/tx.ts index fcb94ebd..7567b3d9 100644 --- a/src/protobuf/cosmos/feegrant/v1beta1/tx.ts +++ b/src/protobuf/cosmos/feegrant/v1beta1/tx.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/feegrant/v1beta1/tx.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/genutil/module/v1/module.ts b/src/protobuf/cosmos/genutil/module/v1/module.ts index f93562c9..da0c41b6 100644 --- a/src/protobuf/cosmos/genutil/module/v1/module.ts +++ b/src/protobuf/cosmos/genutil/module/v1/module.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/genutil/module/v1/module.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/genutil/v1beta1/genesis.ts b/src/protobuf/cosmos/genutil/v1beta1/genesis.ts index 767dfed1..f81e8684 100644 --- a/src/protobuf/cosmos/genutil/v1beta1/genesis.ts +++ b/src/protobuf/cosmos/genutil/v1beta1/genesis.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/genutil/v1beta1/genesis.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/gov/module/v1/module.ts b/src/protobuf/cosmos/gov/module/v1/module.ts index 83fa9935..3450cc2a 100644 --- a/src/protobuf/cosmos/gov/module/v1/module.ts +++ b/src/protobuf/cosmos/gov/module/v1/module.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/gov/module/v1/module.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/gov/v1/genesis.ts b/src/protobuf/cosmos/gov/v1/genesis.ts index 2e1f2ffc..d0e44b48 100644 --- a/src/protobuf/cosmos/gov/v1/genesis.ts +++ b/src/protobuf/cosmos/gov/v1/genesis.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/gov/v1/genesis.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/gov/v1/gov.ts b/src/protobuf/cosmos/gov/v1/gov.ts index da3f27f1..47a05fd3 100644 --- a/src/protobuf/cosmos/gov/v1/gov.ts +++ b/src/protobuf/cosmos/gov/v1/gov.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/gov/v1/gov.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/gov/v1/query.ts b/src/protobuf/cosmos/gov/v1/query.ts index 158b70d8..faedec5b 100644 --- a/src/protobuf/cosmos/gov/v1/query.ts +++ b/src/protobuf/cosmos/gov/v1/query.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/gov/v1/query.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/gov/v1/tx.ts b/src/protobuf/cosmos/gov/v1/tx.ts index 03204ebe..53af9059 100644 --- a/src/protobuf/cosmos/gov/v1/tx.ts +++ b/src/protobuf/cosmos/gov/v1/tx.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/gov/v1/tx.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/gov/v1beta1/genesis.ts b/src/protobuf/cosmos/gov/v1beta1/genesis.ts index b6e6f5e1..d4112d4b 100644 --- a/src/protobuf/cosmos/gov/v1beta1/genesis.ts +++ b/src/protobuf/cosmos/gov/v1beta1/genesis.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/gov/v1beta1/genesis.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/gov/v1beta1/gov.ts b/src/protobuf/cosmos/gov/v1beta1/gov.ts index 7f38facc..52570375 100644 --- a/src/protobuf/cosmos/gov/v1beta1/gov.ts +++ b/src/protobuf/cosmos/gov/v1beta1/gov.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/gov/v1beta1/gov.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/gov/v1beta1/query.ts b/src/protobuf/cosmos/gov/v1beta1/query.ts index 18cf21ba..c12e808e 100644 --- a/src/protobuf/cosmos/gov/v1beta1/query.ts +++ b/src/protobuf/cosmos/gov/v1beta1/query.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/gov/v1beta1/query.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/gov/v1beta1/tx.ts b/src/protobuf/cosmos/gov/v1beta1/tx.ts index 49d3eddc..e3c6fbce 100644 --- a/src/protobuf/cosmos/gov/v1beta1/tx.ts +++ b/src/protobuf/cosmos/gov/v1beta1/tx.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/gov/v1beta1/tx.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/group/module/v1/module.ts b/src/protobuf/cosmos/group/module/v1/module.ts deleted file mode 100644 index 519f4ca7..00000000 --- a/src/protobuf/cosmos/group/module/v1/module.ts +++ /dev/null @@ -1,127 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 -// source: cosmos/group/module/v1/module.proto - -/* eslint-disable */ -import Long from "long"; -import * as _m0 from "protobufjs/minimal"; -import { Duration } from "../../../../google/protobuf/duration"; - -export const protobufPackage = "cosmos.group.module.v1"; - -/** Module is the config object of the group module. */ -export interface Module { - /** - * max_execution_period defines the max duration after a proposal's voting period ends that members can send a MsgExec - * to execute the proposal. - */ - max_execution_period?: - | Duration - | undefined; - /** - * max_metadata_len defines the max length of the metadata bytes field for various entities within the group module. - * Defaults to 255 if not explicitly set. - */ - max_metadata_len: string; -} - -function createBaseModule(): Module { - return { max_execution_period: undefined, max_metadata_len: "0" }; -} - -export const Module = { - encode(message: Module, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.max_execution_period !== undefined) { - Duration.encode(message.max_execution_period, writer.uint32(10).fork()).ldelim(); - } - if (message.max_metadata_len !== "0") { - writer.uint32(16).uint64(message.max_metadata_len); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Module { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseModule(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.max_execution_period = Duration.decode(reader, reader.uint32()); - continue; - case 2: - if (tag !== 16) { - break; - } - - message.max_metadata_len = longToString(reader.uint64() as Long); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): Module { - return { - max_execution_period: isSet(object.max_execution_period) - ? Duration.fromJSON(object.max_execution_period) - : undefined, - max_metadata_len: isSet(object.max_metadata_len) ? globalThis.String(object.max_metadata_len) : "0", - }; - }, - - toJSON(message: Module): unknown { - const obj: any = {}; - if (message.max_execution_period !== undefined) { - obj.max_execution_period = Duration.toJSON(message.max_execution_period); - } - if (message.max_metadata_len !== "0") { - obj.max_metadata_len = message.max_metadata_len; - } - return obj; - }, - - create(base?: DeepPartial): Module { - return Module.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): Module { - const message = createBaseModule(); - message.max_execution_period = (object.max_execution_period !== undefined && object.max_execution_period !== null) - ? Duration.fromPartial(object.max_execution_period) - : undefined; - message.max_metadata_len = object.max_metadata_len ?? "0"; - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin ? T - : T extends globalThis.Array ? globalThis.Array> - : T extends ReadonlyArray ? ReadonlyArray> - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/protobuf/cosmos/group/v1/events.ts b/src/protobuf/cosmos/group/v1/events.ts deleted file mode 100644 index e7d59717..00000000 --- a/src/protobuf/cosmos/group/v1/events.ts +++ /dev/null @@ -1,766 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 -// source: cosmos/group/v1/events.proto - -/* eslint-disable */ -import Long from "long"; -import * as _m0 from "protobufjs/minimal"; -import { - ProposalExecutorResult, - proposalExecutorResultFromJSON, - proposalExecutorResultToJSON, - ProposalStatus, - proposalStatusFromJSON, - proposalStatusToJSON, - TallyResult, -} from "./types"; - -export const protobufPackage = "cosmos.group.v1"; - -/** Since: cosmos-sdk 0.46 */ - -/** EventCreateGroup is an event emitted when a group is created. */ -export interface EventCreateGroup { - /** group_id is the unique ID of the group. */ - group_id: string; -} - -/** EventUpdateGroup is an event emitted when a group is updated. */ -export interface EventUpdateGroup { - /** group_id is the unique ID of the group. */ - group_id: string; -} - -/** EventCreateGroupPolicy is an event emitted when a group policy is created. */ -export interface EventCreateGroupPolicy { - /** address is the account address of the group policy. */ - address: string; -} - -/** EventUpdateGroupPolicy is an event emitted when a group policy is updated. */ -export interface EventUpdateGroupPolicy { - /** address is the account address of the group policy. */ - address: string; -} - -/** EventSubmitProposal is an event emitted when a proposal is created. */ -export interface EventSubmitProposal { - /** proposal_id is the unique ID of the proposal. */ - proposal_id: string; -} - -/** EventWithdrawProposal is an event emitted when a proposal is withdrawn. */ -export interface EventWithdrawProposal { - /** proposal_id is the unique ID of the proposal. */ - proposal_id: string; -} - -/** EventVote is an event emitted when a voter votes on a proposal. */ -export interface EventVote { - /** proposal_id is the unique ID of the proposal. */ - proposal_id: string; -} - -/** EventExec is an event emitted when a proposal is executed. */ -export interface EventExec { - /** proposal_id is the unique ID of the proposal. */ - proposal_id: string; - /** result is the proposal execution result. */ - result: ProposalExecutorResult; - /** logs contains error logs in case the execution result is FAILURE. */ - logs: string; -} - -/** EventLeaveGroup is an event emitted when group member leaves the group. */ -export interface EventLeaveGroup { - /** group_id is the unique ID of the group. */ - group_id: string; - /** address is the account address of the group member. */ - address: string; -} - -/** EventProposalPruned is an event emitted when a proposal is pruned. */ -export interface EventProposalPruned { - /** proposal_id is the unique ID of the proposal. */ - proposal_id: string; - /** status is the proposal status (UNSPECIFIED, SUBMITTED, ACCEPTED, REJECTED, ABORTED, WITHDRAWN). */ - status: ProposalStatus; - /** tally_result is the proposal tally result (when applicable). */ - tally_result?: TallyResult | undefined; -} - -function createBaseEventCreateGroup(): EventCreateGroup { - return { group_id: "0" }; -} - -export const EventCreateGroup = { - encode(message: EventCreateGroup, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.group_id !== "0") { - writer.uint32(8).uint64(message.group_id); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): EventCreateGroup { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEventCreateGroup(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.group_id = longToString(reader.uint64() as Long); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): EventCreateGroup { - return { group_id: isSet(object.group_id) ? globalThis.String(object.group_id) : "0" }; - }, - - toJSON(message: EventCreateGroup): unknown { - const obj: any = {}; - if (message.group_id !== "0") { - obj.group_id = message.group_id; - } - return obj; - }, - - create(base?: DeepPartial): EventCreateGroup { - return EventCreateGroup.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): EventCreateGroup { - const message = createBaseEventCreateGroup(); - message.group_id = object.group_id ?? "0"; - return message; - }, -}; - -function createBaseEventUpdateGroup(): EventUpdateGroup { - return { group_id: "0" }; -} - -export const EventUpdateGroup = { - encode(message: EventUpdateGroup, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.group_id !== "0") { - writer.uint32(8).uint64(message.group_id); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): EventUpdateGroup { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEventUpdateGroup(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.group_id = longToString(reader.uint64() as Long); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): EventUpdateGroup { - return { group_id: isSet(object.group_id) ? globalThis.String(object.group_id) : "0" }; - }, - - toJSON(message: EventUpdateGroup): unknown { - const obj: any = {}; - if (message.group_id !== "0") { - obj.group_id = message.group_id; - } - return obj; - }, - - create(base?: DeepPartial): EventUpdateGroup { - return EventUpdateGroup.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): EventUpdateGroup { - const message = createBaseEventUpdateGroup(); - message.group_id = object.group_id ?? "0"; - return message; - }, -}; - -function createBaseEventCreateGroupPolicy(): EventCreateGroupPolicy { - return { address: "" }; -} - -export const EventCreateGroupPolicy = { - encode(message: EventCreateGroupPolicy, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): EventCreateGroupPolicy { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEventCreateGroupPolicy(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.address = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): EventCreateGroupPolicy { - return { address: isSet(object.address) ? globalThis.String(object.address) : "" }; - }, - - toJSON(message: EventCreateGroupPolicy): unknown { - const obj: any = {}; - if (message.address !== "") { - obj.address = message.address; - } - return obj; - }, - - create(base?: DeepPartial): EventCreateGroupPolicy { - return EventCreateGroupPolicy.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): EventCreateGroupPolicy { - const message = createBaseEventCreateGroupPolicy(); - message.address = object.address ?? ""; - return message; - }, -}; - -function createBaseEventUpdateGroupPolicy(): EventUpdateGroupPolicy { - return { address: "" }; -} - -export const EventUpdateGroupPolicy = { - encode(message: EventUpdateGroupPolicy, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): EventUpdateGroupPolicy { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEventUpdateGroupPolicy(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.address = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): EventUpdateGroupPolicy { - return { address: isSet(object.address) ? globalThis.String(object.address) : "" }; - }, - - toJSON(message: EventUpdateGroupPolicy): unknown { - const obj: any = {}; - if (message.address !== "") { - obj.address = message.address; - } - return obj; - }, - - create(base?: DeepPartial): EventUpdateGroupPolicy { - return EventUpdateGroupPolicy.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): EventUpdateGroupPolicy { - const message = createBaseEventUpdateGroupPolicy(); - message.address = object.address ?? ""; - return message; - }, -}; - -function createBaseEventSubmitProposal(): EventSubmitProposal { - return { proposal_id: "0" }; -} - -export const EventSubmitProposal = { - encode(message: EventSubmitProposal, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.proposal_id !== "0") { - writer.uint32(8).uint64(message.proposal_id); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): EventSubmitProposal { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEventSubmitProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.proposal_id = longToString(reader.uint64() as Long); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): EventSubmitProposal { - return { proposal_id: isSet(object.proposal_id) ? globalThis.String(object.proposal_id) : "0" }; - }, - - toJSON(message: EventSubmitProposal): unknown { - const obj: any = {}; - if (message.proposal_id !== "0") { - obj.proposal_id = message.proposal_id; - } - return obj; - }, - - create(base?: DeepPartial): EventSubmitProposal { - return EventSubmitProposal.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): EventSubmitProposal { - const message = createBaseEventSubmitProposal(); - message.proposal_id = object.proposal_id ?? "0"; - return message; - }, -}; - -function createBaseEventWithdrawProposal(): EventWithdrawProposal { - return { proposal_id: "0" }; -} - -export const EventWithdrawProposal = { - encode(message: EventWithdrawProposal, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.proposal_id !== "0") { - writer.uint32(8).uint64(message.proposal_id); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): EventWithdrawProposal { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEventWithdrawProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.proposal_id = longToString(reader.uint64() as Long); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): EventWithdrawProposal { - return { proposal_id: isSet(object.proposal_id) ? globalThis.String(object.proposal_id) : "0" }; - }, - - toJSON(message: EventWithdrawProposal): unknown { - const obj: any = {}; - if (message.proposal_id !== "0") { - obj.proposal_id = message.proposal_id; - } - return obj; - }, - - create(base?: DeepPartial): EventWithdrawProposal { - return EventWithdrawProposal.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): EventWithdrawProposal { - const message = createBaseEventWithdrawProposal(); - message.proposal_id = object.proposal_id ?? "0"; - return message; - }, -}; - -function createBaseEventVote(): EventVote { - return { proposal_id: "0" }; -} - -export const EventVote = { - encode(message: EventVote, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.proposal_id !== "0") { - writer.uint32(8).uint64(message.proposal_id); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): EventVote { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEventVote(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.proposal_id = longToString(reader.uint64() as Long); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): EventVote { - return { proposal_id: isSet(object.proposal_id) ? globalThis.String(object.proposal_id) : "0" }; - }, - - toJSON(message: EventVote): unknown { - const obj: any = {}; - if (message.proposal_id !== "0") { - obj.proposal_id = message.proposal_id; - } - return obj; - }, - - create(base?: DeepPartial): EventVote { - return EventVote.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): EventVote { - const message = createBaseEventVote(); - message.proposal_id = object.proposal_id ?? "0"; - return message; - }, -}; - -function createBaseEventExec(): EventExec { - return { proposal_id: "0", result: 0, logs: "" }; -} - -export const EventExec = { - encode(message: EventExec, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.proposal_id !== "0") { - writer.uint32(8).uint64(message.proposal_id); - } - if (message.result !== 0) { - writer.uint32(16).int32(message.result); - } - if (message.logs !== "") { - writer.uint32(26).string(message.logs); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): EventExec { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEventExec(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.proposal_id = longToString(reader.uint64() as Long); - continue; - case 2: - if (tag !== 16) { - break; - } - - message.result = reader.int32() as any; - continue; - case 3: - if (tag !== 26) { - break; - } - - message.logs = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): EventExec { - return { - proposal_id: isSet(object.proposal_id) ? globalThis.String(object.proposal_id) : "0", - result: isSet(object.result) ? proposalExecutorResultFromJSON(object.result) : 0, - logs: isSet(object.logs) ? globalThis.String(object.logs) : "", - }; - }, - - toJSON(message: EventExec): unknown { - const obj: any = {}; - if (message.proposal_id !== "0") { - obj.proposal_id = message.proposal_id; - } - if (message.result !== 0) { - obj.result = proposalExecutorResultToJSON(message.result); - } - if (message.logs !== "") { - obj.logs = message.logs; - } - return obj; - }, - - create(base?: DeepPartial): EventExec { - return EventExec.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): EventExec { - const message = createBaseEventExec(); - message.proposal_id = object.proposal_id ?? "0"; - message.result = object.result ?? 0; - message.logs = object.logs ?? ""; - return message; - }, -}; - -function createBaseEventLeaveGroup(): EventLeaveGroup { - return { group_id: "0", address: "" }; -} - -export const EventLeaveGroup = { - encode(message: EventLeaveGroup, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.group_id !== "0") { - writer.uint32(8).uint64(message.group_id); - } - if (message.address !== "") { - writer.uint32(18).string(message.address); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): EventLeaveGroup { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEventLeaveGroup(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.group_id = longToString(reader.uint64() as Long); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.address = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): EventLeaveGroup { - return { - group_id: isSet(object.group_id) ? globalThis.String(object.group_id) : "0", - address: isSet(object.address) ? globalThis.String(object.address) : "", - }; - }, - - toJSON(message: EventLeaveGroup): unknown { - const obj: any = {}; - if (message.group_id !== "0") { - obj.group_id = message.group_id; - } - if (message.address !== "") { - obj.address = message.address; - } - return obj; - }, - - create(base?: DeepPartial): EventLeaveGroup { - return EventLeaveGroup.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): EventLeaveGroup { - const message = createBaseEventLeaveGroup(); - message.group_id = object.group_id ?? "0"; - message.address = object.address ?? ""; - return message; - }, -}; - -function createBaseEventProposalPruned(): EventProposalPruned { - return { proposal_id: "0", status: 0, tally_result: undefined }; -} - -export const EventProposalPruned = { - encode(message: EventProposalPruned, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.proposal_id !== "0") { - writer.uint32(8).uint64(message.proposal_id); - } - if (message.status !== 0) { - writer.uint32(16).int32(message.status); - } - if (message.tally_result !== undefined) { - TallyResult.encode(message.tally_result, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): EventProposalPruned { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEventProposalPruned(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.proposal_id = longToString(reader.uint64() as Long); - continue; - case 2: - if (tag !== 16) { - break; - } - - message.status = reader.int32() as any; - continue; - case 3: - if (tag !== 26) { - break; - } - - message.tally_result = TallyResult.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): EventProposalPruned { - return { - proposal_id: isSet(object.proposal_id) ? globalThis.String(object.proposal_id) : "0", - status: isSet(object.status) ? proposalStatusFromJSON(object.status) : 0, - tally_result: isSet(object.tally_result) ? TallyResult.fromJSON(object.tally_result) : undefined, - }; - }, - - toJSON(message: EventProposalPruned): unknown { - const obj: any = {}; - if (message.proposal_id !== "0") { - obj.proposal_id = message.proposal_id; - } - if (message.status !== 0) { - obj.status = proposalStatusToJSON(message.status); - } - if (message.tally_result !== undefined) { - obj.tally_result = TallyResult.toJSON(message.tally_result); - } - return obj; - }, - - create(base?: DeepPartial): EventProposalPruned { - return EventProposalPruned.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): EventProposalPruned { - const message = createBaseEventProposalPruned(); - message.proposal_id = object.proposal_id ?? "0"; - message.status = object.status ?? 0; - message.tally_result = (object.tally_result !== undefined && object.tally_result !== null) - ? TallyResult.fromPartial(object.tally_result) - : undefined; - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin ? T - : T extends globalThis.Array ? globalThis.Array> - : T extends ReadonlyArray ? ReadonlyArray> - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/protobuf/cosmos/group/v1/genesis.ts b/src/protobuf/cosmos/group/v1/genesis.ts deleted file mode 100644 index c2826b62..00000000 --- a/src/protobuf/cosmos/group/v1/genesis.ts +++ /dev/null @@ -1,243 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 -// source: cosmos/group/v1/genesis.proto - -/* eslint-disable */ -import Long from "long"; -import * as _m0 from "protobufjs/minimal"; -import { GroupInfo, GroupMember, GroupPolicyInfo, Proposal, Vote } from "./types"; - -export const protobufPackage = "cosmos.group.v1"; - -/** Since: cosmos-sdk 0.46 */ - -/** GenesisState defines the group module's genesis state. */ -export interface GenesisState { - /** - * group_seq is the group table orm.Sequence, - * it is used to get the next group ID. - */ - group_seq: string; - /** groups is the list of groups info. */ - groups: GroupInfo[]; - /** group_members is the list of groups members. */ - group_members: GroupMember[]; - /** - * group_policy_seq is the group policy table orm.Sequence, - * it is used to generate the next group policy account address. - */ - group_policy_seq: string; - /** group_policies is the list of group policies info. */ - group_policies: GroupPolicyInfo[]; - /** - * proposal_seq is the proposal table orm.Sequence, - * it is used to get the next proposal ID. - */ - proposal_seq: string; - /** proposals is the list of proposals. */ - proposals: Proposal[]; - /** votes is the list of votes. */ - votes: Vote[]; -} - -function createBaseGenesisState(): GenesisState { - return { - group_seq: "0", - groups: [], - group_members: [], - group_policy_seq: "0", - group_policies: [], - proposal_seq: "0", - proposals: [], - votes: [], - }; -} - -export const GenesisState = { - encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.group_seq !== "0") { - writer.uint32(8).uint64(message.group_seq); - } - for (const v of message.groups) { - GroupInfo.encode(v!, writer.uint32(18).fork()).ldelim(); - } - for (const v of message.group_members) { - GroupMember.encode(v!, writer.uint32(26).fork()).ldelim(); - } - if (message.group_policy_seq !== "0") { - writer.uint32(32).uint64(message.group_policy_seq); - } - for (const v of message.group_policies) { - GroupPolicyInfo.encode(v!, writer.uint32(42).fork()).ldelim(); - } - if (message.proposal_seq !== "0") { - writer.uint32(48).uint64(message.proposal_seq); - } - for (const v of message.proposals) { - Proposal.encode(v!, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.votes) { - Vote.encode(v!, writer.uint32(66).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.group_seq = longToString(reader.uint64() as Long); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.groups.push(GroupInfo.decode(reader, reader.uint32())); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.group_members.push(GroupMember.decode(reader, reader.uint32())); - continue; - case 4: - if (tag !== 32) { - break; - } - - message.group_policy_seq = longToString(reader.uint64() as Long); - continue; - case 5: - if (tag !== 42) { - break; - } - - message.group_policies.push(GroupPolicyInfo.decode(reader, reader.uint32())); - continue; - case 6: - if (tag !== 48) { - break; - } - - message.proposal_seq = longToString(reader.uint64() as Long); - continue; - case 7: - if (tag !== 58) { - break; - } - - message.proposals.push(Proposal.decode(reader, reader.uint32())); - continue; - case 8: - if (tag !== 66) { - break; - } - - message.votes.push(Vote.decode(reader, reader.uint32())); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): GenesisState { - return { - group_seq: isSet(object.group_seq) ? globalThis.String(object.group_seq) : "0", - groups: globalThis.Array.isArray(object?.groups) ? object.groups.map((e: any) => GroupInfo.fromJSON(e)) : [], - group_members: globalThis.Array.isArray(object?.group_members) - ? object.group_members.map((e: any) => GroupMember.fromJSON(e)) - : [], - group_policy_seq: isSet(object.group_policy_seq) ? globalThis.String(object.group_policy_seq) : "0", - group_policies: globalThis.Array.isArray(object?.group_policies) - ? object.group_policies.map((e: any) => GroupPolicyInfo.fromJSON(e)) - : [], - proposal_seq: isSet(object.proposal_seq) ? globalThis.String(object.proposal_seq) : "0", - proposals: globalThis.Array.isArray(object?.proposals) - ? object.proposals.map((e: any) => Proposal.fromJSON(e)) - : [], - votes: globalThis.Array.isArray(object?.votes) ? object.votes.map((e: any) => Vote.fromJSON(e)) : [], - }; - }, - - toJSON(message: GenesisState): unknown { - const obj: any = {}; - if (message.group_seq !== "0") { - obj.group_seq = message.group_seq; - } - if (message.groups?.length) { - obj.groups = message.groups.map((e) => GroupInfo.toJSON(e)); - } - if (message.group_members?.length) { - obj.group_members = message.group_members.map((e) => GroupMember.toJSON(e)); - } - if (message.group_policy_seq !== "0") { - obj.group_policy_seq = message.group_policy_seq; - } - if (message.group_policies?.length) { - obj.group_policies = message.group_policies.map((e) => GroupPolicyInfo.toJSON(e)); - } - if (message.proposal_seq !== "0") { - obj.proposal_seq = message.proposal_seq; - } - if (message.proposals?.length) { - obj.proposals = message.proposals.map((e) => Proposal.toJSON(e)); - } - if (message.votes?.length) { - obj.votes = message.votes.map((e) => Vote.toJSON(e)); - } - return obj; - }, - - create(base?: DeepPartial): GenesisState { - return GenesisState.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): GenesisState { - const message = createBaseGenesisState(); - message.group_seq = object.group_seq ?? "0"; - message.groups = object.groups?.map((e) => GroupInfo.fromPartial(e)) || []; - message.group_members = object.group_members?.map((e) => GroupMember.fromPartial(e)) || []; - message.group_policy_seq = object.group_policy_seq ?? "0"; - message.group_policies = object.group_policies?.map((e) => GroupPolicyInfo.fromPartial(e)) || []; - message.proposal_seq = object.proposal_seq ?? "0"; - message.proposals = object.proposals?.map((e) => Proposal.fromPartial(e)) || []; - message.votes = object.votes?.map((e) => Vote.fromPartial(e)) || []; - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin ? T - : T extends globalThis.Array ? globalThis.Array> - : T extends ReadonlyArray ? ReadonlyArray> - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/protobuf/cosmos/group/v1/query.ts b/src/protobuf/cosmos/group/v1/query.ts deleted file mode 100644 index 537c75d9..00000000 --- a/src/protobuf/cosmos/group/v1/query.ts +++ /dev/null @@ -1,2351 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 -// source: cosmos/group/v1/query.proto - -/* eslint-disable */ -import Long from "long"; -import * as _m0 from "protobufjs/minimal"; -import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; -import { GroupInfo, GroupMember, GroupPolicyInfo, Proposal, TallyResult, Vote } from "./types"; - -export const protobufPackage = "cosmos.group.v1"; - -/** Since: cosmos-sdk 0.46 */ - -/** QueryGroupInfoRequest is the Query/GroupInfo request type. */ -export interface QueryGroupInfoRequest { - /** group_id is the unique ID of the group. */ - group_id: string; -} - -/** QueryGroupInfoResponse is the Query/GroupInfo response type. */ -export interface QueryGroupInfoResponse { - /** info is the GroupInfo of the group. */ - info?: GroupInfo | undefined; -} - -/** QueryGroupPolicyInfoRequest is the Query/GroupPolicyInfo request type. */ -export interface QueryGroupPolicyInfoRequest { - /** address is the account address of the group policy. */ - address: string; -} - -/** QueryGroupPolicyInfoResponse is the Query/GroupPolicyInfo response type. */ -export interface QueryGroupPolicyInfoResponse { - /** info is the GroupPolicyInfo of the group policy. */ - info?: GroupPolicyInfo | undefined; -} - -/** QueryGroupMembersRequest is the Query/GroupMembers request type. */ -export interface QueryGroupMembersRequest { - /** group_id is the unique ID of the group. */ - group_id: string; - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequest | undefined; -} - -/** QueryGroupMembersResponse is the Query/GroupMembersResponse response type. */ -export interface QueryGroupMembersResponse { - /** members are the members of the group with given group_id. */ - members: GroupMember[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponse | undefined; -} - -/** QueryGroupsByAdminRequest is the Query/GroupsByAdmin request type. */ -export interface QueryGroupsByAdminRequest { - /** admin is the account address of a group's admin. */ - admin: string; - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequest | undefined; -} - -/** QueryGroupsByAdminResponse is the Query/GroupsByAdminResponse response type. */ -export interface QueryGroupsByAdminResponse { - /** groups are the groups info with the provided admin. */ - groups: GroupInfo[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponse | undefined; -} - -/** QueryGroupPoliciesByGroupRequest is the Query/GroupPoliciesByGroup request type. */ -export interface QueryGroupPoliciesByGroupRequest { - /** group_id is the unique ID of the group policy's group. */ - group_id: string; - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequest | undefined; -} - -/** QueryGroupPoliciesByGroupResponse is the Query/GroupPoliciesByGroup response type. */ -export interface QueryGroupPoliciesByGroupResponse { - /** group_policies are the group policies info associated with the provided group. */ - group_policies: GroupPolicyInfo[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponse | undefined; -} - -/** QueryGroupPoliciesByAdminRequest is the Query/GroupPoliciesByAdmin request type. */ -export interface QueryGroupPoliciesByAdminRequest { - /** admin is the admin address of the group policy. */ - admin: string; - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequest | undefined; -} - -/** QueryGroupPoliciesByAdminResponse is the Query/GroupPoliciesByAdmin response type. */ -export interface QueryGroupPoliciesByAdminResponse { - /** group_policies are the group policies info with provided admin. */ - group_policies: GroupPolicyInfo[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponse | undefined; -} - -/** QueryProposalRequest is the Query/Proposal request type. */ -export interface QueryProposalRequest { - /** proposal_id is the unique ID of a proposal. */ - proposal_id: string; -} - -/** QueryProposalResponse is the Query/Proposal response type. */ -export interface QueryProposalResponse { - /** proposal is the proposal info. */ - proposal?: Proposal | undefined; -} - -/** QueryProposalsByGroupPolicyRequest is the Query/ProposalByGroupPolicy request type. */ -export interface QueryProposalsByGroupPolicyRequest { - /** address is the account address of the group policy related to proposals. */ - address: string; - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequest | undefined; -} - -/** QueryProposalsByGroupPolicyResponse is the Query/ProposalByGroupPolicy response type. */ -export interface QueryProposalsByGroupPolicyResponse { - /** proposals are the proposals with given group policy. */ - proposals: Proposal[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponse | undefined; -} - -/** QueryVoteByProposalVoterRequest is the Query/VoteByProposalVoter request type. */ -export interface QueryVoteByProposalVoterRequest { - /** proposal_id is the unique ID of a proposal. */ - proposal_id: string; - /** voter is a proposal voter account address. */ - voter: string; -} - -/** QueryVoteByProposalVoterResponse is the Query/VoteByProposalVoter response type. */ -export interface QueryVoteByProposalVoterResponse { - /** vote is the vote with given proposal_id and voter. */ - vote?: Vote | undefined; -} - -/** QueryVotesByProposalRequest is the Query/VotesByProposal request type. */ -export interface QueryVotesByProposalRequest { - /** proposal_id is the unique ID of a proposal. */ - proposal_id: string; - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequest | undefined; -} - -/** QueryVotesByProposalResponse is the Query/VotesByProposal response type. */ -export interface QueryVotesByProposalResponse { - /** votes are the list of votes for given proposal_id. */ - votes: Vote[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponse | undefined; -} - -/** QueryVotesByVoterRequest is the Query/VotesByVoter request type. */ -export interface QueryVotesByVoterRequest { - /** voter is a proposal voter account address. */ - voter: string; - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequest | undefined; -} - -/** QueryVotesByVoterResponse is the Query/VotesByVoter response type. */ -export interface QueryVotesByVoterResponse { - /** votes are the list of votes by given voter. */ - votes: Vote[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponse | undefined; -} - -/** QueryGroupsByMemberRequest is the Query/GroupsByMember request type. */ -export interface QueryGroupsByMemberRequest { - /** address is the group member address. */ - address: string; - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequest | undefined; -} - -/** QueryGroupsByMemberResponse is the Query/GroupsByMember response type. */ -export interface QueryGroupsByMemberResponse { - /** groups are the groups info with the provided group member. */ - groups: GroupInfo[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponse | undefined; -} - -/** QueryTallyResultRequest is the Query/TallyResult request type. */ -export interface QueryTallyResultRequest { - /** proposal_id is the unique id of a proposal. */ - proposal_id: string; -} - -/** QueryTallyResultResponse is the Query/TallyResult response type. */ -export interface QueryTallyResultResponse { - /** tally defines the requested tally. */ - tally?: TallyResult | undefined; -} - -/** - * QueryGroupsRequest is the Query/Groups request type. - * - * Since: cosmos-sdk 0.47.1 - */ -export interface QueryGroupsRequest { - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequest | undefined; -} - -/** - * QueryGroupsResponse is the Query/Groups response type. - * - * Since: cosmos-sdk 0.47.1 - */ -export interface QueryGroupsResponse { - /** `groups` is all the groups present in state. */ - groups: GroupInfo[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponse | undefined; -} - -function createBaseQueryGroupInfoRequest(): QueryGroupInfoRequest { - return { group_id: "0" }; -} - -export const QueryGroupInfoRequest = { - encode(message: QueryGroupInfoRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.group_id !== "0") { - writer.uint32(8).uint64(message.group_id); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryGroupInfoRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGroupInfoRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.group_id = longToString(reader.uint64() as Long); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryGroupInfoRequest { - return { group_id: isSet(object.group_id) ? globalThis.String(object.group_id) : "0" }; - }, - - toJSON(message: QueryGroupInfoRequest): unknown { - const obj: any = {}; - if (message.group_id !== "0") { - obj.group_id = message.group_id; - } - return obj; - }, - - create(base?: DeepPartial): QueryGroupInfoRequest { - return QueryGroupInfoRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryGroupInfoRequest { - const message = createBaseQueryGroupInfoRequest(); - message.group_id = object.group_id ?? "0"; - return message; - }, -}; - -function createBaseQueryGroupInfoResponse(): QueryGroupInfoResponse { - return { info: undefined }; -} - -export const QueryGroupInfoResponse = { - encode(message: QueryGroupInfoResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.info !== undefined) { - GroupInfo.encode(message.info, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryGroupInfoResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGroupInfoResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.info = GroupInfo.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryGroupInfoResponse { - return { info: isSet(object.info) ? GroupInfo.fromJSON(object.info) : undefined }; - }, - - toJSON(message: QueryGroupInfoResponse): unknown { - const obj: any = {}; - if (message.info !== undefined) { - obj.info = GroupInfo.toJSON(message.info); - } - return obj; - }, - - create(base?: DeepPartial): QueryGroupInfoResponse { - return QueryGroupInfoResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryGroupInfoResponse { - const message = createBaseQueryGroupInfoResponse(); - message.info = (object.info !== undefined && object.info !== null) ? GroupInfo.fromPartial(object.info) : undefined; - return message; - }, -}; - -function createBaseQueryGroupPolicyInfoRequest(): QueryGroupPolicyInfoRequest { - return { address: "" }; -} - -export const QueryGroupPolicyInfoRequest = { - encode(message: QueryGroupPolicyInfoRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryGroupPolicyInfoRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGroupPolicyInfoRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.address = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryGroupPolicyInfoRequest { - return { address: isSet(object.address) ? globalThis.String(object.address) : "" }; - }, - - toJSON(message: QueryGroupPolicyInfoRequest): unknown { - const obj: any = {}; - if (message.address !== "") { - obj.address = message.address; - } - return obj; - }, - - create(base?: DeepPartial): QueryGroupPolicyInfoRequest { - return QueryGroupPolicyInfoRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryGroupPolicyInfoRequest { - const message = createBaseQueryGroupPolicyInfoRequest(); - message.address = object.address ?? ""; - return message; - }, -}; - -function createBaseQueryGroupPolicyInfoResponse(): QueryGroupPolicyInfoResponse { - return { info: undefined }; -} - -export const QueryGroupPolicyInfoResponse = { - encode(message: QueryGroupPolicyInfoResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.info !== undefined) { - GroupPolicyInfo.encode(message.info, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryGroupPolicyInfoResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGroupPolicyInfoResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.info = GroupPolicyInfo.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryGroupPolicyInfoResponse { - return { info: isSet(object.info) ? GroupPolicyInfo.fromJSON(object.info) : undefined }; - }, - - toJSON(message: QueryGroupPolicyInfoResponse): unknown { - const obj: any = {}; - if (message.info !== undefined) { - obj.info = GroupPolicyInfo.toJSON(message.info); - } - return obj; - }, - - create(base?: DeepPartial): QueryGroupPolicyInfoResponse { - return QueryGroupPolicyInfoResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryGroupPolicyInfoResponse { - const message = createBaseQueryGroupPolicyInfoResponse(); - message.info = (object.info !== undefined && object.info !== null) - ? GroupPolicyInfo.fromPartial(object.info) - : undefined; - return message; - }, -}; - -function createBaseQueryGroupMembersRequest(): QueryGroupMembersRequest { - return { group_id: "0", pagination: undefined }; -} - -export const QueryGroupMembersRequest = { - encode(message: QueryGroupMembersRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.group_id !== "0") { - writer.uint32(8).uint64(message.group_id); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryGroupMembersRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGroupMembersRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.group_id = longToString(reader.uint64() as Long); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.pagination = PageRequest.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryGroupMembersRequest { - return { - group_id: isSet(object.group_id) ? globalThis.String(object.group_id) : "0", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, - }; - }, - - toJSON(message: QueryGroupMembersRequest): unknown { - const obj: any = {}; - if (message.group_id !== "0") { - obj.group_id = message.group_id; - } - if (message.pagination !== undefined) { - obj.pagination = PageRequest.toJSON(message.pagination); - } - return obj; - }, - - create(base?: DeepPartial): QueryGroupMembersRequest { - return QueryGroupMembersRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryGroupMembersRequest { - const message = createBaseQueryGroupMembersRequest(); - message.group_id = object.group_id ?? "0"; - message.pagination = (object.pagination !== undefined && object.pagination !== null) - ? PageRequest.fromPartial(object.pagination) - : undefined; - return message; - }, -}; - -function createBaseQueryGroupMembersResponse(): QueryGroupMembersResponse { - return { members: [], pagination: undefined }; -} - -export const QueryGroupMembersResponse = { - encode(message: QueryGroupMembersResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.members) { - GroupMember.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryGroupMembersResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGroupMembersResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.members.push(GroupMember.decode(reader, reader.uint32())); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.pagination = PageResponse.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryGroupMembersResponse { - return { - members: globalThis.Array.isArray(object?.members) ? object.members.map((e: any) => GroupMember.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, - }; - }, - - toJSON(message: QueryGroupMembersResponse): unknown { - const obj: any = {}; - if (message.members?.length) { - obj.members = message.members.map((e) => GroupMember.toJSON(e)); - } - if (message.pagination !== undefined) { - obj.pagination = PageResponse.toJSON(message.pagination); - } - return obj; - }, - - create(base?: DeepPartial): QueryGroupMembersResponse { - return QueryGroupMembersResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryGroupMembersResponse { - const message = createBaseQueryGroupMembersResponse(); - message.members = object.members?.map((e) => GroupMember.fromPartial(e)) || []; - message.pagination = (object.pagination !== undefined && object.pagination !== null) - ? PageResponse.fromPartial(object.pagination) - : undefined; - return message; - }, -}; - -function createBaseQueryGroupsByAdminRequest(): QueryGroupsByAdminRequest { - return { admin: "", pagination: undefined }; -} - -export const QueryGroupsByAdminRequest = { - encode(message: QueryGroupsByAdminRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.admin !== "") { - writer.uint32(10).string(message.admin); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryGroupsByAdminRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGroupsByAdminRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.admin = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.pagination = PageRequest.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryGroupsByAdminRequest { - return { - admin: isSet(object.admin) ? globalThis.String(object.admin) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, - }; - }, - - toJSON(message: QueryGroupsByAdminRequest): unknown { - const obj: any = {}; - if (message.admin !== "") { - obj.admin = message.admin; - } - if (message.pagination !== undefined) { - obj.pagination = PageRequest.toJSON(message.pagination); - } - return obj; - }, - - create(base?: DeepPartial): QueryGroupsByAdminRequest { - return QueryGroupsByAdminRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryGroupsByAdminRequest { - const message = createBaseQueryGroupsByAdminRequest(); - message.admin = object.admin ?? ""; - message.pagination = (object.pagination !== undefined && object.pagination !== null) - ? PageRequest.fromPartial(object.pagination) - : undefined; - return message; - }, -}; - -function createBaseQueryGroupsByAdminResponse(): QueryGroupsByAdminResponse { - return { groups: [], pagination: undefined }; -} - -export const QueryGroupsByAdminResponse = { - encode(message: QueryGroupsByAdminResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.groups) { - GroupInfo.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryGroupsByAdminResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGroupsByAdminResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.groups.push(GroupInfo.decode(reader, reader.uint32())); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.pagination = PageResponse.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryGroupsByAdminResponse { - return { - groups: globalThis.Array.isArray(object?.groups) ? object.groups.map((e: any) => GroupInfo.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, - }; - }, - - toJSON(message: QueryGroupsByAdminResponse): unknown { - const obj: any = {}; - if (message.groups?.length) { - obj.groups = message.groups.map((e) => GroupInfo.toJSON(e)); - } - if (message.pagination !== undefined) { - obj.pagination = PageResponse.toJSON(message.pagination); - } - return obj; - }, - - create(base?: DeepPartial): QueryGroupsByAdminResponse { - return QueryGroupsByAdminResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryGroupsByAdminResponse { - const message = createBaseQueryGroupsByAdminResponse(); - message.groups = object.groups?.map((e) => GroupInfo.fromPartial(e)) || []; - message.pagination = (object.pagination !== undefined && object.pagination !== null) - ? PageResponse.fromPartial(object.pagination) - : undefined; - return message; - }, -}; - -function createBaseQueryGroupPoliciesByGroupRequest(): QueryGroupPoliciesByGroupRequest { - return { group_id: "0", pagination: undefined }; -} - -export const QueryGroupPoliciesByGroupRequest = { - encode(message: QueryGroupPoliciesByGroupRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.group_id !== "0") { - writer.uint32(8).uint64(message.group_id); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryGroupPoliciesByGroupRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGroupPoliciesByGroupRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.group_id = longToString(reader.uint64() as Long); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.pagination = PageRequest.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryGroupPoliciesByGroupRequest { - return { - group_id: isSet(object.group_id) ? globalThis.String(object.group_id) : "0", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, - }; - }, - - toJSON(message: QueryGroupPoliciesByGroupRequest): unknown { - const obj: any = {}; - if (message.group_id !== "0") { - obj.group_id = message.group_id; - } - if (message.pagination !== undefined) { - obj.pagination = PageRequest.toJSON(message.pagination); - } - return obj; - }, - - create(base?: DeepPartial): QueryGroupPoliciesByGroupRequest { - return QueryGroupPoliciesByGroupRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryGroupPoliciesByGroupRequest { - const message = createBaseQueryGroupPoliciesByGroupRequest(); - message.group_id = object.group_id ?? "0"; - message.pagination = (object.pagination !== undefined && object.pagination !== null) - ? PageRequest.fromPartial(object.pagination) - : undefined; - return message; - }, -}; - -function createBaseQueryGroupPoliciesByGroupResponse(): QueryGroupPoliciesByGroupResponse { - return { group_policies: [], pagination: undefined }; -} - -export const QueryGroupPoliciesByGroupResponse = { - encode(message: QueryGroupPoliciesByGroupResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.group_policies) { - GroupPolicyInfo.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryGroupPoliciesByGroupResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGroupPoliciesByGroupResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.group_policies.push(GroupPolicyInfo.decode(reader, reader.uint32())); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.pagination = PageResponse.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryGroupPoliciesByGroupResponse { - return { - group_policies: globalThis.Array.isArray(object?.group_policies) - ? object.group_policies.map((e: any) => GroupPolicyInfo.fromJSON(e)) - : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, - }; - }, - - toJSON(message: QueryGroupPoliciesByGroupResponse): unknown { - const obj: any = {}; - if (message.group_policies?.length) { - obj.group_policies = message.group_policies.map((e) => GroupPolicyInfo.toJSON(e)); - } - if (message.pagination !== undefined) { - obj.pagination = PageResponse.toJSON(message.pagination); - } - return obj; - }, - - create(base?: DeepPartial): QueryGroupPoliciesByGroupResponse { - return QueryGroupPoliciesByGroupResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryGroupPoliciesByGroupResponse { - const message = createBaseQueryGroupPoliciesByGroupResponse(); - message.group_policies = object.group_policies?.map((e) => GroupPolicyInfo.fromPartial(e)) || []; - message.pagination = (object.pagination !== undefined && object.pagination !== null) - ? PageResponse.fromPartial(object.pagination) - : undefined; - return message; - }, -}; - -function createBaseQueryGroupPoliciesByAdminRequest(): QueryGroupPoliciesByAdminRequest { - return { admin: "", pagination: undefined }; -} - -export const QueryGroupPoliciesByAdminRequest = { - encode(message: QueryGroupPoliciesByAdminRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.admin !== "") { - writer.uint32(10).string(message.admin); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryGroupPoliciesByAdminRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGroupPoliciesByAdminRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.admin = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.pagination = PageRequest.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryGroupPoliciesByAdminRequest { - return { - admin: isSet(object.admin) ? globalThis.String(object.admin) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, - }; - }, - - toJSON(message: QueryGroupPoliciesByAdminRequest): unknown { - const obj: any = {}; - if (message.admin !== "") { - obj.admin = message.admin; - } - if (message.pagination !== undefined) { - obj.pagination = PageRequest.toJSON(message.pagination); - } - return obj; - }, - - create(base?: DeepPartial): QueryGroupPoliciesByAdminRequest { - return QueryGroupPoliciesByAdminRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryGroupPoliciesByAdminRequest { - const message = createBaseQueryGroupPoliciesByAdminRequest(); - message.admin = object.admin ?? ""; - message.pagination = (object.pagination !== undefined && object.pagination !== null) - ? PageRequest.fromPartial(object.pagination) - : undefined; - return message; - }, -}; - -function createBaseQueryGroupPoliciesByAdminResponse(): QueryGroupPoliciesByAdminResponse { - return { group_policies: [], pagination: undefined }; -} - -export const QueryGroupPoliciesByAdminResponse = { - encode(message: QueryGroupPoliciesByAdminResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.group_policies) { - GroupPolicyInfo.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryGroupPoliciesByAdminResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGroupPoliciesByAdminResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.group_policies.push(GroupPolicyInfo.decode(reader, reader.uint32())); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.pagination = PageResponse.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryGroupPoliciesByAdminResponse { - return { - group_policies: globalThis.Array.isArray(object?.group_policies) - ? object.group_policies.map((e: any) => GroupPolicyInfo.fromJSON(e)) - : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, - }; - }, - - toJSON(message: QueryGroupPoliciesByAdminResponse): unknown { - const obj: any = {}; - if (message.group_policies?.length) { - obj.group_policies = message.group_policies.map((e) => GroupPolicyInfo.toJSON(e)); - } - if (message.pagination !== undefined) { - obj.pagination = PageResponse.toJSON(message.pagination); - } - return obj; - }, - - create(base?: DeepPartial): QueryGroupPoliciesByAdminResponse { - return QueryGroupPoliciesByAdminResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryGroupPoliciesByAdminResponse { - const message = createBaseQueryGroupPoliciesByAdminResponse(); - message.group_policies = object.group_policies?.map((e) => GroupPolicyInfo.fromPartial(e)) || []; - message.pagination = (object.pagination !== undefined && object.pagination !== null) - ? PageResponse.fromPartial(object.pagination) - : undefined; - return message; - }, -}; - -function createBaseQueryProposalRequest(): QueryProposalRequest { - return { proposal_id: "0" }; -} - -export const QueryProposalRequest = { - encode(message: QueryProposalRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.proposal_id !== "0") { - writer.uint32(8).uint64(message.proposal_id); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryProposalRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryProposalRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.proposal_id = longToString(reader.uint64() as Long); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryProposalRequest { - return { proposal_id: isSet(object.proposal_id) ? globalThis.String(object.proposal_id) : "0" }; - }, - - toJSON(message: QueryProposalRequest): unknown { - const obj: any = {}; - if (message.proposal_id !== "0") { - obj.proposal_id = message.proposal_id; - } - return obj; - }, - - create(base?: DeepPartial): QueryProposalRequest { - return QueryProposalRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryProposalRequest { - const message = createBaseQueryProposalRequest(); - message.proposal_id = object.proposal_id ?? "0"; - return message; - }, -}; - -function createBaseQueryProposalResponse(): QueryProposalResponse { - return { proposal: undefined }; -} - -export const QueryProposalResponse = { - encode(message: QueryProposalResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.proposal !== undefined) { - Proposal.encode(message.proposal, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryProposalResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryProposalResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.proposal = Proposal.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryProposalResponse { - return { proposal: isSet(object.proposal) ? Proposal.fromJSON(object.proposal) : undefined }; - }, - - toJSON(message: QueryProposalResponse): unknown { - const obj: any = {}; - if (message.proposal !== undefined) { - obj.proposal = Proposal.toJSON(message.proposal); - } - return obj; - }, - - create(base?: DeepPartial): QueryProposalResponse { - return QueryProposalResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryProposalResponse { - const message = createBaseQueryProposalResponse(); - message.proposal = (object.proposal !== undefined && object.proposal !== null) - ? Proposal.fromPartial(object.proposal) - : undefined; - return message; - }, -}; - -function createBaseQueryProposalsByGroupPolicyRequest(): QueryProposalsByGroupPolicyRequest { - return { address: "", pagination: undefined }; -} - -export const QueryProposalsByGroupPolicyRequest = { - encode(message: QueryProposalsByGroupPolicyRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryProposalsByGroupPolicyRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryProposalsByGroupPolicyRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.address = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.pagination = PageRequest.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryProposalsByGroupPolicyRequest { - return { - address: isSet(object.address) ? globalThis.String(object.address) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, - }; - }, - - toJSON(message: QueryProposalsByGroupPolicyRequest): unknown { - const obj: any = {}; - if (message.address !== "") { - obj.address = message.address; - } - if (message.pagination !== undefined) { - obj.pagination = PageRequest.toJSON(message.pagination); - } - return obj; - }, - - create(base?: DeepPartial): QueryProposalsByGroupPolicyRequest { - return QueryProposalsByGroupPolicyRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryProposalsByGroupPolicyRequest { - const message = createBaseQueryProposalsByGroupPolicyRequest(); - message.address = object.address ?? ""; - message.pagination = (object.pagination !== undefined && object.pagination !== null) - ? PageRequest.fromPartial(object.pagination) - : undefined; - return message; - }, -}; - -function createBaseQueryProposalsByGroupPolicyResponse(): QueryProposalsByGroupPolicyResponse { - return { proposals: [], pagination: undefined }; -} - -export const QueryProposalsByGroupPolicyResponse = { - encode(message: QueryProposalsByGroupPolicyResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.proposals) { - Proposal.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryProposalsByGroupPolicyResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryProposalsByGroupPolicyResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.proposals.push(Proposal.decode(reader, reader.uint32())); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.pagination = PageResponse.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryProposalsByGroupPolicyResponse { - return { - proposals: globalThis.Array.isArray(object?.proposals) - ? object.proposals.map((e: any) => Proposal.fromJSON(e)) - : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, - }; - }, - - toJSON(message: QueryProposalsByGroupPolicyResponse): unknown { - const obj: any = {}; - if (message.proposals?.length) { - obj.proposals = message.proposals.map((e) => Proposal.toJSON(e)); - } - if (message.pagination !== undefined) { - obj.pagination = PageResponse.toJSON(message.pagination); - } - return obj; - }, - - create(base?: DeepPartial): QueryProposalsByGroupPolicyResponse { - return QueryProposalsByGroupPolicyResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryProposalsByGroupPolicyResponse { - const message = createBaseQueryProposalsByGroupPolicyResponse(); - message.proposals = object.proposals?.map((e) => Proposal.fromPartial(e)) || []; - message.pagination = (object.pagination !== undefined && object.pagination !== null) - ? PageResponse.fromPartial(object.pagination) - : undefined; - return message; - }, -}; - -function createBaseQueryVoteByProposalVoterRequest(): QueryVoteByProposalVoterRequest { - return { proposal_id: "0", voter: "" }; -} - -export const QueryVoteByProposalVoterRequest = { - encode(message: QueryVoteByProposalVoterRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.proposal_id !== "0") { - writer.uint32(8).uint64(message.proposal_id); - } - if (message.voter !== "") { - writer.uint32(18).string(message.voter); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryVoteByProposalVoterRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryVoteByProposalVoterRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.proposal_id = longToString(reader.uint64() as Long); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.voter = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryVoteByProposalVoterRequest { - return { - proposal_id: isSet(object.proposal_id) ? globalThis.String(object.proposal_id) : "0", - voter: isSet(object.voter) ? globalThis.String(object.voter) : "", - }; - }, - - toJSON(message: QueryVoteByProposalVoterRequest): unknown { - const obj: any = {}; - if (message.proposal_id !== "0") { - obj.proposal_id = message.proposal_id; - } - if (message.voter !== "") { - obj.voter = message.voter; - } - return obj; - }, - - create(base?: DeepPartial): QueryVoteByProposalVoterRequest { - return QueryVoteByProposalVoterRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryVoteByProposalVoterRequest { - const message = createBaseQueryVoteByProposalVoterRequest(); - message.proposal_id = object.proposal_id ?? "0"; - message.voter = object.voter ?? ""; - return message; - }, -}; - -function createBaseQueryVoteByProposalVoterResponse(): QueryVoteByProposalVoterResponse { - return { vote: undefined }; -} - -export const QueryVoteByProposalVoterResponse = { - encode(message: QueryVoteByProposalVoterResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.vote !== undefined) { - Vote.encode(message.vote, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryVoteByProposalVoterResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryVoteByProposalVoterResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.vote = Vote.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryVoteByProposalVoterResponse { - return { vote: isSet(object.vote) ? Vote.fromJSON(object.vote) : undefined }; - }, - - toJSON(message: QueryVoteByProposalVoterResponse): unknown { - const obj: any = {}; - if (message.vote !== undefined) { - obj.vote = Vote.toJSON(message.vote); - } - return obj; - }, - - create(base?: DeepPartial): QueryVoteByProposalVoterResponse { - return QueryVoteByProposalVoterResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryVoteByProposalVoterResponse { - const message = createBaseQueryVoteByProposalVoterResponse(); - message.vote = (object.vote !== undefined && object.vote !== null) ? Vote.fromPartial(object.vote) : undefined; - return message; - }, -}; - -function createBaseQueryVotesByProposalRequest(): QueryVotesByProposalRequest { - return { proposal_id: "0", pagination: undefined }; -} - -export const QueryVotesByProposalRequest = { - encode(message: QueryVotesByProposalRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.proposal_id !== "0") { - writer.uint32(8).uint64(message.proposal_id); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryVotesByProposalRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryVotesByProposalRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.proposal_id = longToString(reader.uint64() as Long); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.pagination = PageRequest.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryVotesByProposalRequest { - return { - proposal_id: isSet(object.proposal_id) ? globalThis.String(object.proposal_id) : "0", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, - }; - }, - - toJSON(message: QueryVotesByProposalRequest): unknown { - const obj: any = {}; - if (message.proposal_id !== "0") { - obj.proposal_id = message.proposal_id; - } - if (message.pagination !== undefined) { - obj.pagination = PageRequest.toJSON(message.pagination); - } - return obj; - }, - - create(base?: DeepPartial): QueryVotesByProposalRequest { - return QueryVotesByProposalRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryVotesByProposalRequest { - const message = createBaseQueryVotesByProposalRequest(); - message.proposal_id = object.proposal_id ?? "0"; - message.pagination = (object.pagination !== undefined && object.pagination !== null) - ? PageRequest.fromPartial(object.pagination) - : undefined; - return message; - }, -}; - -function createBaseQueryVotesByProposalResponse(): QueryVotesByProposalResponse { - return { votes: [], pagination: undefined }; -} - -export const QueryVotesByProposalResponse = { - encode(message: QueryVotesByProposalResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.votes) { - Vote.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryVotesByProposalResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryVotesByProposalResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.votes.push(Vote.decode(reader, reader.uint32())); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.pagination = PageResponse.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryVotesByProposalResponse { - return { - votes: globalThis.Array.isArray(object?.votes) ? object.votes.map((e: any) => Vote.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, - }; - }, - - toJSON(message: QueryVotesByProposalResponse): unknown { - const obj: any = {}; - if (message.votes?.length) { - obj.votes = message.votes.map((e) => Vote.toJSON(e)); - } - if (message.pagination !== undefined) { - obj.pagination = PageResponse.toJSON(message.pagination); - } - return obj; - }, - - create(base?: DeepPartial): QueryVotesByProposalResponse { - return QueryVotesByProposalResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryVotesByProposalResponse { - const message = createBaseQueryVotesByProposalResponse(); - message.votes = object.votes?.map((e) => Vote.fromPartial(e)) || []; - message.pagination = (object.pagination !== undefined && object.pagination !== null) - ? PageResponse.fromPartial(object.pagination) - : undefined; - return message; - }, -}; - -function createBaseQueryVotesByVoterRequest(): QueryVotesByVoterRequest { - return { voter: "", pagination: undefined }; -} - -export const QueryVotesByVoterRequest = { - encode(message: QueryVotesByVoterRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.voter !== "") { - writer.uint32(10).string(message.voter); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryVotesByVoterRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryVotesByVoterRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.voter = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.pagination = PageRequest.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryVotesByVoterRequest { - return { - voter: isSet(object.voter) ? globalThis.String(object.voter) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, - }; - }, - - toJSON(message: QueryVotesByVoterRequest): unknown { - const obj: any = {}; - if (message.voter !== "") { - obj.voter = message.voter; - } - if (message.pagination !== undefined) { - obj.pagination = PageRequest.toJSON(message.pagination); - } - return obj; - }, - - create(base?: DeepPartial): QueryVotesByVoterRequest { - return QueryVotesByVoterRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryVotesByVoterRequest { - const message = createBaseQueryVotesByVoterRequest(); - message.voter = object.voter ?? ""; - message.pagination = (object.pagination !== undefined && object.pagination !== null) - ? PageRequest.fromPartial(object.pagination) - : undefined; - return message; - }, -}; - -function createBaseQueryVotesByVoterResponse(): QueryVotesByVoterResponse { - return { votes: [], pagination: undefined }; -} - -export const QueryVotesByVoterResponse = { - encode(message: QueryVotesByVoterResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.votes) { - Vote.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryVotesByVoterResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryVotesByVoterResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.votes.push(Vote.decode(reader, reader.uint32())); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.pagination = PageResponse.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryVotesByVoterResponse { - return { - votes: globalThis.Array.isArray(object?.votes) ? object.votes.map((e: any) => Vote.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, - }; - }, - - toJSON(message: QueryVotesByVoterResponse): unknown { - const obj: any = {}; - if (message.votes?.length) { - obj.votes = message.votes.map((e) => Vote.toJSON(e)); - } - if (message.pagination !== undefined) { - obj.pagination = PageResponse.toJSON(message.pagination); - } - return obj; - }, - - create(base?: DeepPartial): QueryVotesByVoterResponse { - return QueryVotesByVoterResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryVotesByVoterResponse { - const message = createBaseQueryVotesByVoterResponse(); - message.votes = object.votes?.map((e) => Vote.fromPartial(e)) || []; - message.pagination = (object.pagination !== undefined && object.pagination !== null) - ? PageResponse.fromPartial(object.pagination) - : undefined; - return message; - }, -}; - -function createBaseQueryGroupsByMemberRequest(): QueryGroupsByMemberRequest { - return { address: "", pagination: undefined }; -} - -export const QueryGroupsByMemberRequest = { - encode(message: QueryGroupsByMemberRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryGroupsByMemberRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGroupsByMemberRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.address = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.pagination = PageRequest.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryGroupsByMemberRequest { - return { - address: isSet(object.address) ? globalThis.String(object.address) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, - }; - }, - - toJSON(message: QueryGroupsByMemberRequest): unknown { - const obj: any = {}; - if (message.address !== "") { - obj.address = message.address; - } - if (message.pagination !== undefined) { - obj.pagination = PageRequest.toJSON(message.pagination); - } - return obj; - }, - - create(base?: DeepPartial): QueryGroupsByMemberRequest { - return QueryGroupsByMemberRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryGroupsByMemberRequest { - const message = createBaseQueryGroupsByMemberRequest(); - message.address = object.address ?? ""; - message.pagination = (object.pagination !== undefined && object.pagination !== null) - ? PageRequest.fromPartial(object.pagination) - : undefined; - return message; - }, -}; - -function createBaseQueryGroupsByMemberResponse(): QueryGroupsByMemberResponse { - return { groups: [], pagination: undefined }; -} - -export const QueryGroupsByMemberResponse = { - encode(message: QueryGroupsByMemberResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.groups) { - GroupInfo.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryGroupsByMemberResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGroupsByMemberResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.groups.push(GroupInfo.decode(reader, reader.uint32())); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.pagination = PageResponse.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryGroupsByMemberResponse { - return { - groups: globalThis.Array.isArray(object?.groups) ? object.groups.map((e: any) => GroupInfo.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, - }; - }, - - toJSON(message: QueryGroupsByMemberResponse): unknown { - const obj: any = {}; - if (message.groups?.length) { - obj.groups = message.groups.map((e) => GroupInfo.toJSON(e)); - } - if (message.pagination !== undefined) { - obj.pagination = PageResponse.toJSON(message.pagination); - } - return obj; - }, - - create(base?: DeepPartial): QueryGroupsByMemberResponse { - return QueryGroupsByMemberResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryGroupsByMemberResponse { - const message = createBaseQueryGroupsByMemberResponse(); - message.groups = object.groups?.map((e) => GroupInfo.fromPartial(e)) || []; - message.pagination = (object.pagination !== undefined && object.pagination !== null) - ? PageResponse.fromPartial(object.pagination) - : undefined; - return message; - }, -}; - -function createBaseQueryTallyResultRequest(): QueryTallyResultRequest { - return { proposal_id: "0" }; -} - -export const QueryTallyResultRequest = { - encode(message: QueryTallyResultRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.proposal_id !== "0") { - writer.uint32(8).uint64(message.proposal_id); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryTallyResultRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryTallyResultRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.proposal_id = longToString(reader.uint64() as Long); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryTallyResultRequest { - return { proposal_id: isSet(object.proposal_id) ? globalThis.String(object.proposal_id) : "0" }; - }, - - toJSON(message: QueryTallyResultRequest): unknown { - const obj: any = {}; - if (message.proposal_id !== "0") { - obj.proposal_id = message.proposal_id; - } - return obj; - }, - - create(base?: DeepPartial): QueryTallyResultRequest { - return QueryTallyResultRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryTallyResultRequest { - const message = createBaseQueryTallyResultRequest(); - message.proposal_id = object.proposal_id ?? "0"; - return message; - }, -}; - -function createBaseQueryTallyResultResponse(): QueryTallyResultResponse { - return { tally: undefined }; -} - -export const QueryTallyResultResponse = { - encode(message: QueryTallyResultResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.tally !== undefined) { - TallyResult.encode(message.tally, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryTallyResultResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryTallyResultResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.tally = TallyResult.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryTallyResultResponse { - return { tally: isSet(object.tally) ? TallyResult.fromJSON(object.tally) : undefined }; - }, - - toJSON(message: QueryTallyResultResponse): unknown { - const obj: any = {}; - if (message.tally !== undefined) { - obj.tally = TallyResult.toJSON(message.tally); - } - return obj; - }, - - create(base?: DeepPartial): QueryTallyResultResponse { - return QueryTallyResultResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryTallyResultResponse { - const message = createBaseQueryTallyResultResponse(); - message.tally = (object.tally !== undefined && object.tally !== null) - ? TallyResult.fromPartial(object.tally) - : undefined; - return message; - }, -}; - -function createBaseQueryGroupsRequest(): QueryGroupsRequest { - return { pagination: undefined }; -} - -export const QueryGroupsRequest = { - encode(message: QueryGroupsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryGroupsRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGroupsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - if (tag !== 18) { - break; - } - - message.pagination = PageRequest.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryGroupsRequest { - return { pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; - }, - - toJSON(message: QueryGroupsRequest): unknown { - const obj: any = {}; - if (message.pagination !== undefined) { - obj.pagination = PageRequest.toJSON(message.pagination); - } - return obj; - }, - - create(base?: DeepPartial): QueryGroupsRequest { - return QueryGroupsRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryGroupsRequest { - const message = createBaseQueryGroupsRequest(); - message.pagination = (object.pagination !== undefined && object.pagination !== null) - ? PageRequest.fromPartial(object.pagination) - : undefined; - return message; - }, -}; - -function createBaseQueryGroupsResponse(): QueryGroupsResponse { - return { groups: [], pagination: undefined }; -} - -export const QueryGroupsResponse = { - encode(message: QueryGroupsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.groups) { - GroupInfo.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryGroupsResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryGroupsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.groups.push(GroupInfo.decode(reader, reader.uint32())); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.pagination = PageResponse.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryGroupsResponse { - return { - groups: globalThis.Array.isArray(object?.groups) ? object.groups.map((e: any) => GroupInfo.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, - }; - }, - - toJSON(message: QueryGroupsResponse): unknown { - const obj: any = {}; - if (message.groups?.length) { - obj.groups = message.groups.map((e) => GroupInfo.toJSON(e)); - } - if (message.pagination !== undefined) { - obj.pagination = PageResponse.toJSON(message.pagination); - } - return obj; - }, - - create(base?: DeepPartial): QueryGroupsResponse { - return QueryGroupsResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryGroupsResponse { - const message = createBaseQueryGroupsResponse(); - message.groups = object.groups?.map((e) => GroupInfo.fromPartial(e)) || []; - message.pagination = (object.pagination !== undefined && object.pagination !== null) - ? PageResponse.fromPartial(object.pagination) - : undefined; - return message; - }, -}; - -/** Query is the cosmos.group.v1 Query service. */ -export interface Query { - /** GroupInfo queries group info based on group id. */ - GroupInfo(request: QueryGroupInfoRequest): Promise; - /** GroupPolicyInfo queries group policy info based on account address of group policy. */ - GroupPolicyInfo(request: QueryGroupPolicyInfoRequest): Promise; - /** GroupMembers queries members of a group by group id. */ - GroupMembers(request: QueryGroupMembersRequest): Promise; - /** GroupsByAdmin queries groups by admin address. */ - GroupsByAdmin(request: QueryGroupsByAdminRequest): Promise; - /** GroupPoliciesByGroup queries group policies by group id. */ - GroupPoliciesByGroup(request: QueryGroupPoliciesByGroupRequest): Promise; - /** GroupPoliciesByAdmin queries group policies by admin address. */ - GroupPoliciesByAdmin(request: QueryGroupPoliciesByAdminRequest): Promise; - /** Proposal queries a proposal based on proposal id. */ - Proposal(request: QueryProposalRequest): Promise; - /** ProposalsByGroupPolicy queries proposals based on account address of group policy. */ - ProposalsByGroupPolicy(request: QueryProposalsByGroupPolicyRequest): Promise; - /** VoteByProposalVoter queries a vote by proposal id and voter. */ - VoteByProposalVoter(request: QueryVoteByProposalVoterRequest): Promise; - /** VotesByProposal queries a vote by proposal id. */ - VotesByProposal(request: QueryVotesByProposalRequest): Promise; - /** VotesByVoter queries a vote by voter. */ - VotesByVoter(request: QueryVotesByVoterRequest): Promise; - /** GroupsByMember queries groups by member address. */ - GroupsByMember(request: QueryGroupsByMemberRequest): Promise; - /** - * 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. - */ - TallyResult(request: QueryTallyResultRequest): Promise; - /** - * Groups queries all groups in state. - * - * Since: cosmos-sdk 0.47.1 - */ - Groups(request: QueryGroupsRequest): Promise; -} - -export const QueryServiceName = "cosmos.group.v1.Query"; -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - private readonly service: string; - constructor(rpc: Rpc, opts?: { service?: string }) { - this.service = opts?.service || QueryServiceName; - this.rpc = rpc; - this.GroupInfo = this.GroupInfo.bind(this); - this.GroupPolicyInfo = this.GroupPolicyInfo.bind(this); - this.GroupMembers = this.GroupMembers.bind(this); - this.GroupsByAdmin = this.GroupsByAdmin.bind(this); - this.GroupPoliciesByGroup = this.GroupPoliciesByGroup.bind(this); - this.GroupPoliciesByAdmin = this.GroupPoliciesByAdmin.bind(this); - this.Proposal = this.Proposal.bind(this); - this.ProposalsByGroupPolicy = this.ProposalsByGroupPolicy.bind(this); - this.VoteByProposalVoter = this.VoteByProposalVoter.bind(this); - this.VotesByProposal = this.VotesByProposal.bind(this); - this.VotesByVoter = this.VotesByVoter.bind(this); - this.GroupsByMember = this.GroupsByMember.bind(this); - this.TallyResult = this.TallyResult.bind(this); - this.Groups = this.Groups.bind(this); - } - GroupInfo(request: QueryGroupInfoRequest): Promise { - const data = QueryGroupInfoRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, "GroupInfo", data); - return promise.then((data) => QueryGroupInfoResponse.decode(_m0.Reader.create(data))); - } - - GroupPolicyInfo(request: QueryGroupPolicyInfoRequest): Promise { - const data = QueryGroupPolicyInfoRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, "GroupPolicyInfo", data); - return promise.then((data) => QueryGroupPolicyInfoResponse.decode(_m0.Reader.create(data))); - } - - GroupMembers(request: QueryGroupMembersRequest): Promise { - const data = QueryGroupMembersRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, "GroupMembers", data); - return promise.then((data) => QueryGroupMembersResponse.decode(_m0.Reader.create(data))); - } - - GroupsByAdmin(request: QueryGroupsByAdminRequest): Promise { - const data = QueryGroupsByAdminRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, "GroupsByAdmin", data); - return promise.then((data) => QueryGroupsByAdminResponse.decode(_m0.Reader.create(data))); - } - - GroupPoliciesByGroup(request: QueryGroupPoliciesByGroupRequest): Promise { - const data = QueryGroupPoliciesByGroupRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, "GroupPoliciesByGroup", data); - return promise.then((data) => QueryGroupPoliciesByGroupResponse.decode(_m0.Reader.create(data))); - } - - GroupPoliciesByAdmin(request: QueryGroupPoliciesByAdminRequest): Promise { - const data = QueryGroupPoliciesByAdminRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, "GroupPoliciesByAdmin", data); - return promise.then((data) => QueryGroupPoliciesByAdminResponse.decode(_m0.Reader.create(data))); - } - - Proposal(request: QueryProposalRequest): Promise { - const data = QueryProposalRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, "Proposal", data); - return promise.then((data) => QueryProposalResponse.decode(_m0.Reader.create(data))); - } - - ProposalsByGroupPolicy(request: QueryProposalsByGroupPolicyRequest): Promise { - const data = QueryProposalsByGroupPolicyRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, "ProposalsByGroupPolicy", data); - return promise.then((data) => QueryProposalsByGroupPolicyResponse.decode(_m0.Reader.create(data))); - } - - VoteByProposalVoter(request: QueryVoteByProposalVoterRequest): Promise { - const data = QueryVoteByProposalVoterRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, "VoteByProposalVoter", data); - return promise.then((data) => QueryVoteByProposalVoterResponse.decode(_m0.Reader.create(data))); - } - - VotesByProposal(request: QueryVotesByProposalRequest): Promise { - const data = QueryVotesByProposalRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, "VotesByProposal", data); - return promise.then((data) => QueryVotesByProposalResponse.decode(_m0.Reader.create(data))); - } - - VotesByVoter(request: QueryVotesByVoterRequest): Promise { - const data = QueryVotesByVoterRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, "VotesByVoter", data); - return promise.then((data) => QueryVotesByVoterResponse.decode(_m0.Reader.create(data))); - } - - GroupsByMember(request: QueryGroupsByMemberRequest): Promise { - const data = QueryGroupsByMemberRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, "GroupsByMember", data); - return promise.then((data) => QueryGroupsByMemberResponse.decode(_m0.Reader.create(data))); - } - - TallyResult(request: QueryTallyResultRequest): Promise { - const data = QueryTallyResultRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, "TallyResult", data); - return promise.then((data) => QueryTallyResultResponse.decode(_m0.Reader.create(data))); - } - - Groups(request: QueryGroupsRequest): Promise { - const data = QueryGroupsRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, "Groups", data); - return promise.then((data) => QueryGroupsResponse.decode(_m0.Reader.create(data))); - } -} - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin ? T - : T extends globalThis.Array ? globalThis.Array> - : T extends ReadonlyArray ? ReadonlyArray> - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/protobuf/cosmos/group/v1/tx.ts b/src/protobuf/cosmos/group/v1/tx.ts deleted file mode 100644 index 6c37f8d3..00000000 --- a/src/protobuf/cosmos/group/v1/tx.ts +++ /dev/null @@ -1,2544 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 -// source: cosmos/group/v1/tx.proto - -/* eslint-disable */ -import Long from "long"; -import * as _m0 from "protobufjs/minimal"; -import { Any } from "../../../google/protobuf/any"; -import { - MemberRequest, - ProposalExecutorResult, - proposalExecutorResultFromJSON, - proposalExecutorResultToJSON, - VoteOption, - voteOptionFromJSON, - voteOptionToJSON, -} from "./types"; - -export const protobufPackage = "cosmos.group.v1"; - -/** Since: cosmos-sdk 0.46 */ - -/** Exec defines modes of execution of a proposal on creation or on new vote. */ -export enum Exec { - /** - * EXEC_UNSPECIFIED - An empty value means that there should be a separate - * MsgExec request for the proposal to execute. - */ - EXEC_UNSPECIFIED = 0, - /** - * 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. - */ - EXEC_TRY = 1, - UNRECOGNIZED = -1, -} - -export function execFromJSON(object: any): Exec { - switch (object) { - case 0: - case "EXEC_UNSPECIFIED": - return Exec.EXEC_UNSPECIFIED; - case 1: - case "EXEC_TRY": - return Exec.EXEC_TRY; - case -1: - case "UNRECOGNIZED": - default: - return Exec.UNRECOGNIZED; - } -} - -export function execToJSON(object: Exec): string { - switch (object) { - case Exec.EXEC_UNSPECIFIED: - return "EXEC_UNSPECIFIED"; - case Exec.EXEC_TRY: - return "EXEC_TRY"; - case Exec.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -/** MsgCreateGroup is the Msg/CreateGroup request type. */ -export interface MsgCreateGroup { - /** admin is the account address of the group admin. */ - admin: string; - /** members defines the group members. */ - members: MemberRequest[]; - /** metadata is any arbitrary metadata to attached to the group. */ - metadata: string; -} - -/** MsgCreateGroupResponse is the Msg/CreateGroup response type. */ -export interface MsgCreateGroupResponse { - /** group_id is the unique ID of the newly created group. */ - group_id: string; -} - -/** MsgUpdateGroupMembers is the Msg/UpdateGroupMembers request type. */ -export interface MsgUpdateGroupMembers { - /** admin is the account address of the group admin. */ - admin: string; - /** group_id is the unique ID of the group. */ - group_id: string; - /** - * member_updates is the list of members to update, - * set weight to 0 to remove a member. - */ - member_updates: MemberRequest[]; -} - -/** MsgUpdateGroupMembersResponse is the Msg/UpdateGroupMembers response type. */ -export interface MsgUpdateGroupMembersResponse { -} - -/** MsgUpdateGroupAdmin is the Msg/UpdateGroupAdmin request type. */ -export interface MsgUpdateGroupAdmin { - /** admin is the current account address of the group admin. */ - admin: string; - /** group_id is the unique ID of the group. */ - group_id: string; - /** new_admin is the group new admin account address. */ - new_admin: string; -} - -/** MsgUpdateGroupAdminResponse is the Msg/UpdateGroupAdmin response type. */ -export interface MsgUpdateGroupAdminResponse { -} - -/** MsgUpdateGroupMetadata is the Msg/UpdateGroupMetadata request type. */ -export interface MsgUpdateGroupMetadata { - /** admin is the account address of the group admin. */ - admin: string; - /** group_id is the unique ID of the group. */ - group_id: string; - /** metadata is the updated group's metadata. */ - metadata: string; -} - -/** MsgUpdateGroupMetadataResponse is the Msg/UpdateGroupMetadata response type. */ -export interface MsgUpdateGroupMetadataResponse { -} - -/** MsgCreateGroupPolicy is the Msg/CreateGroupPolicy request type. */ -export interface MsgCreateGroupPolicy { - /** admin is the account address of the group admin. */ - admin: string; - /** group_id is the unique ID of the group. */ - group_id: string; - /** metadata is any arbitrary metadata attached to the group policy. */ - metadata: string; - /** decision_policy specifies the group policy's decision policy. */ - decision_policy?: Any | undefined; -} - -/** MsgCreateGroupPolicyResponse is the Msg/CreateGroupPolicy response type. */ -export interface MsgCreateGroupPolicyResponse { - /** address is the account address of the newly created group policy. */ - address: string; -} - -/** MsgUpdateGroupPolicyAdmin is the Msg/UpdateGroupPolicyAdmin request type. */ -export interface MsgUpdateGroupPolicyAdmin { - /** admin is the account address of the group admin. */ - admin: string; - /** group_policy_address is the account address of the group policy. */ - group_policy_address: string; - /** new_admin is the new group policy admin. */ - new_admin: string; -} - -/** MsgUpdateGroupPolicyAdminResponse is the Msg/UpdateGroupPolicyAdmin response type. */ -export interface MsgUpdateGroupPolicyAdminResponse { -} - -/** MsgCreateGroupWithPolicy is the Msg/CreateGroupWithPolicy request type. */ -export interface MsgCreateGroupWithPolicy { - /** admin is the account address of the group and group policy admin. */ - admin: string; - /** members defines the group members. */ - members: MemberRequest[]; - /** group_metadata is any arbitrary metadata attached to the group. */ - group_metadata: string; - /** group_policy_metadata is any arbitrary metadata attached to the group policy. */ - group_policy_metadata: string; - /** - * 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. - */ - group_policy_as_admin: boolean; - /** decision_policy specifies the group policy's decision policy. */ - decision_policy?: Any | undefined; -} - -/** MsgCreateGroupWithPolicyResponse is the Msg/CreateGroupWithPolicy response type. */ -export interface MsgCreateGroupWithPolicyResponse { - /** group_id is the unique ID of the newly created group with policy. */ - group_id: string; - /** group_policy_address is the account address of the newly created group policy. */ - group_policy_address: string; -} - -/** MsgUpdateGroupPolicyDecisionPolicy is the Msg/UpdateGroupPolicyDecisionPolicy request type. */ -export interface MsgUpdateGroupPolicyDecisionPolicy { - /** admin is the account address of the group admin. */ - admin: string; - /** group_policy_address is the account address of group policy. */ - group_policy_address: string; - /** decision_policy is the updated group policy's decision policy. */ - decision_policy?: Any | undefined; -} - -/** MsgUpdateGroupPolicyDecisionPolicyResponse is the Msg/UpdateGroupPolicyDecisionPolicy response type. */ -export interface MsgUpdateGroupPolicyDecisionPolicyResponse { -} - -/** MsgUpdateGroupPolicyMetadata is the Msg/UpdateGroupPolicyMetadata request type. */ -export interface MsgUpdateGroupPolicyMetadata { - /** admin is the account address of the group admin. */ - admin: string; - /** group_policy_address is the account address of group policy. */ - group_policy_address: string; - /** metadata is the group policy metadata to be updated. */ - metadata: string; -} - -/** MsgUpdateGroupPolicyMetadataResponse is the Msg/UpdateGroupPolicyMetadata response type. */ -export interface MsgUpdateGroupPolicyMetadataResponse { -} - -/** MsgSubmitProposal is the Msg/SubmitProposal request type. */ -export interface MsgSubmitProposal { - /** group_policy_address is the account address of group policy. */ - group_policy_address: string; - /** - * proposers are the account addresses of the proposers. - * Proposers signatures will be counted as yes votes. - */ - proposers: string[]; - /** metadata is any arbitrary metadata attached to the proposal. */ - metadata: string; - /** messages is a list of `sdk.Msg`s that will be executed if the proposal passes. */ - messages: Any[]; - /** - * 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. - */ - exec: Exec; - /** - * title is the title of the proposal. - * - * Since: cosmos-sdk 0.47 - */ - title: string; - /** - * summary is the summary of the proposal. - * - * Since: cosmos-sdk 0.47 - */ - summary: string; -} - -/** MsgSubmitProposalResponse is the Msg/SubmitProposal response type. */ -export interface MsgSubmitProposalResponse { - /** proposal is the unique ID of the proposal. */ - proposal_id: string; -} - -/** MsgWithdrawProposal is the Msg/WithdrawProposal request type. */ -export interface MsgWithdrawProposal { - /** proposal is the unique ID of the proposal. */ - proposal_id: string; - /** address is the admin of the group policy or one of the proposer of the proposal. */ - address: string; -} - -/** MsgWithdrawProposalResponse is the Msg/WithdrawProposal response type. */ -export interface MsgWithdrawProposalResponse { -} - -/** MsgVote is the Msg/Vote request type. */ -export interface MsgVote { - /** proposal is the unique ID of the proposal. */ - proposal_id: string; - /** voter is the voter account address. */ - voter: string; - /** option is the voter's choice on the proposal. */ - option: VoteOption; - /** metadata is any arbitrary metadata attached to the vote. */ - metadata: string; - /** - * exec defines whether the proposal should be executed - * immediately after voting or not. - */ - exec: Exec; -} - -/** MsgVoteResponse is the Msg/Vote response type. */ -export interface MsgVoteResponse { -} - -/** MsgExec is the Msg/Exec request type. */ -export interface MsgExec { - /** proposal is the unique ID of the proposal. */ - proposal_id: string; - /** executor is the account address used to execute the proposal. */ - executor: string; -} - -/** MsgExecResponse is the Msg/Exec request type. */ -export interface MsgExecResponse { - /** result is the final result of the proposal execution. */ - result: ProposalExecutorResult; -} - -/** MsgLeaveGroup is the Msg/LeaveGroup request type. */ -export interface MsgLeaveGroup { - /** address is the account address of the group member. */ - address: string; - /** group_id is the unique ID of the group. */ - group_id: string; -} - -/** MsgLeaveGroupResponse is the Msg/LeaveGroup response type. */ -export interface MsgLeaveGroupResponse { -} - -function createBaseMsgCreateGroup(): MsgCreateGroup { - return { admin: "", members: [], metadata: "" }; -} - -export const MsgCreateGroup = { - encode(message: MsgCreateGroup, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.admin !== "") { - writer.uint32(10).string(message.admin); - } - for (const v of message.members) { - MemberRequest.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.metadata !== "") { - writer.uint32(26).string(message.metadata); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateGroup { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgCreateGroup(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.admin = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.members.push(MemberRequest.decode(reader, reader.uint32())); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.metadata = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): MsgCreateGroup { - return { - admin: isSet(object.admin) ? globalThis.String(object.admin) : "", - members: globalThis.Array.isArray(object?.members) - ? object.members.map((e: any) => MemberRequest.fromJSON(e)) - : [], - metadata: isSet(object.metadata) ? globalThis.String(object.metadata) : "", - }; - }, - - toJSON(message: MsgCreateGroup): unknown { - const obj: any = {}; - if (message.admin !== "") { - obj.admin = message.admin; - } - if (message.members?.length) { - obj.members = message.members.map((e) => MemberRequest.toJSON(e)); - } - if (message.metadata !== "") { - obj.metadata = message.metadata; - } - return obj; - }, - - create(base?: DeepPartial): MsgCreateGroup { - return MsgCreateGroup.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): MsgCreateGroup { - const message = createBaseMsgCreateGroup(); - message.admin = object.admin ?? ""; - message.members = object.members?.map((e) => MemberRequest.fromPartial(e)) || []; - message.metadata = object.metadata ?? ""; - return message; - }, -}; - -function createBaseMsgCreateGroupResponse(): MsgCreateGroupResponse { - return { group_id: "0" }; -} - -export const MsgCreateGroupResponse = { - encode(message: MsgCreateGroupResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.group_id !== "0") { - writer.uint32(8).uint64(message.group_id); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateGroupResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgCreateGroupResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.group_id = longToString(reader.uint64() as Long); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): MsgCreateGroupResponse { - return { group_id: isSet(object.group_id) ? globalThis.String(object.group_id) : "0" }; - }, - - toJSON(message: MsgCreateGroupResponse): unknown { - const obj: any = {}; - if (message.group_id !== "0") { - obj.group_id = message.group_id; - } - return obj; - }, - - create(base?: DeepPartial): MsgCreateGroupResponse { - return MsgCreateGroupResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): MsgCreateGroupResponse { - const message = createBaseMsgCreateGroupResponse(); - message.group_id = object.group_id ?? "0"; - return message; - }, -}; - -function createBaseMsgUpdateGroupMembers(): MsgUpdateGroupMembers { - return { admin: "", group_id: "0", member_updates: [] }; -} - -export const MsgUpdateGroupMembers = { - encode(message: MsgUpdateGroupMembers, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.admin !== "") { - writer.uint32(10).string(message.admin); - } - if (message.group_id !== "0") { - writer.uint32(16).uint64(message.group_id); - } - for (const v of message.member_updates) { - MemberRequest.encode(v!, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateGroupMembers { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgUpdateGroupMembers(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.admin = reader.string(); - continue; - case 2: - if (tag !== 16) { - break; - } - - message.group_id = longToString(reader.uint64() as Long); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.member_updates.push(MemberRequest.decode(reader, reader.uint32())); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): MsgUpdateGroupMembers { - return { - admin: isSet(object.admin) ? globalThis.String(object.admin) : "", - group_id: isSet(object.group_id) ? globalThis.String(object.group_id) : "0", - member_updates: globalThis.Array.isArray(object?.member_updates) - ? object.member_updates.map((e: any) => MemberRequest.fromJSON(e)) - : [], - }; - }, - - toJSON(message: MsgUpdateGroupMembers): unknown { - const obj: any = {}; - if (message.admin !== "") { - obj.admin = message.admin; - } - if (message.group_id !== "0") { - obj.group_id = message.group_id; - } - if (message.member_updates?.length) { - obj.member_updates = message.member_updates.map((e) => MemberRequest.toJSON(e)); - } - return obj; - }, - - create(base?: DeepPartial): MsgUpdateGroupMembers { - return MsgUpdateGroupMembers.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): MsgUpdateGroupMembers { - const message = createBaseMsgUpdateGroupMembers(); - message.admin = object.admin ?? ""; - message.group_id = object.group_id ?? "0"; - message.member_updates = object.member_updates?.map((e) => MemberRequest.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseMsgUpdateGroupMembersResponse(): MsgUpdateGroupMembersResponse { - return {}; -} - -export const MsgUpdateGroupMembersResponse = { - encode(_: MsgUpdateGroupMembersResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateGroupMembersResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgUpdateGroupMembersResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(_: any): MsgUpdateGroupMembersResponse { - return {}; - }, - - toJSON(_: MsgUpdateGroupMembersResponse): unknown { - const obj: any = {}; - return obj; - }, - - create(base?: DeepPartial): MsgUpdateGroupMembersResponse { - return MsgUpdateGroupMembersResponse.fromPartial(base ?? {}); - }, - fromPartial(_: DeepPartial): MsgUpdateGroupMembersResponse { - const message = createBaseMsgUpdateGroupMembersResponse(); - return message; - }, -}; - -function createBaseMsgUpdateGroupAdmin(): MsgUpdateGroupAdmin { - return { admin: "", group_id: "0", new_admin: "" }; -} - -export const MsgUpdateGroupAdmin = { - encode(message: MsgUpdateGroupAdmin, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.admin !== "") { - writer.uint32(10).string(message.admin); - } - if (message.group_id !== "0") { - writer.uint32(16).uint64(message.group_id); - } - if (message.new_admin !== "") { - writer.uint32(26).string(message.new_admin); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateGroupAdmin { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgUpdateGroupAdmin(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.admin = reader.string(); - continue; - case 2: - if (tag !== 16) { - break; - } - - message.group_id = longToString(reader.uint64() as Long); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.new_admin = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): MsgUpdateGroupAdmin { - return { - admin: isSet(object.admin) ? globalThis.String(object.admin) : "", - group_id: isSet(object.group_id) ? globalThis.String(object.group_id) : "0", - new_admin: isSet(object.new_admin) ? globalThis.String(object.new_admin) : "", - }; - }, - - toJSON(message: MsgUpdateGroupAdmin): unknown { - const obj: any = {}; - if (message.admin !== "") { - obj.admin = message.admin; - } - if (message.group_id !== "0") { - obj.group_id = message.group_id; - } - if (message.new_admin !== "") { - obj.new_admin = message.new_admin; - } - return obj; - }, - - create(base?: DeepPartial): MsgUpdateGroupAdmin { - return MsgUpdateGroupAdmin.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): MsgUpdateGroupAdmin { - const message = createBaseMsgUpdateGroupAdmin(); - message.admin = object.admin ?? ""; - message.group_id = object.group_id ?? "0"; - message.new_admin = object.new_admin ?? ""; - return message; - }, -}; - -function createBaseMsgUpdateGroupAdminResponse(): MsgUpdateGroupAdminResponse { - return {}; -} - -export const MsgUpdateGroupAdminResponse = { - encode(_: MsgUpdateGroupAdminResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateGroupAdminResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgUpdateGroupAdminResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(_: any): MsgUpdateGroupAdminResponse { - return {}; - }, - - toJSON(_: MsgUpdateGroupAdminResponse): unknown { - const obj: any = {}; - return obj; - }, - - create(base?: DeepPartial): MsgUpdateGroupAdminResponse { - return MsgUpdateGroupAdminResponse.fromPartial(base ?? {}); - }, - fromPartial(_: DeepPartial): MsgUpdateGroupAdminResponse { - const message = createBaseMsgUpdateGroupAdminResponse(); - return message; - }, -}; - -function createBaseMsgUpdateGroupMetadata(): MsgUpdateGroupMetadata { - return { admin: "", group_id: "0", metadata: "" }; -} - -export const MsgUpdateGroupMetadata = { - encode(message: MsgUpdateGroupMetadata, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.admin !== "") { - writer.uint32(10).string(message.admin); - } - if (message.group_id !== "0") { - writer.uint32(16).uint64(message.group_id); - } - if (message.metadata !== "") { - writer.uint32(26).string(message.metadata); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateGroupMetadata { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgUpdateGroupMetadata(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.admin = reader.string(); - continue; - case 2: - if (tag !== 16) { - break; - } - - message.group_id = longToString(reader.uint64() as Long); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.metadata = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): MsgUpdateGroupMetadata { - return { - admin: isSet(object.admin) ? globalThis.String(object.admin) : "", - group_id: isSet(object.group_id) ? globalThis.String(object.group_id) : "0", - metadata: isSet(object.metadata) ? globalThis.String(object.metadata) : "", - }; - }, - - toJSON(message: MsgUpdateGroupMetadata): unknown { - const obj: any = {}; - if (message.admin !== "") { - obj.admin = message.admin; - } - if (message.group_id !== "0") { - obj.group_id = message.group_id; - } - if (message.metadata !== "") { - obj.metadata = message.metadata; - } - return obj; - }, - - create(base?: DeepPartial): MsgUpdateGroupMetadata { - return MsgUpdateGroupMetadata.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): MsgUpdateGroupMetadata { - const message = createBaseMsgUpdateGroupMetadata(); - message.admin = object.admin ?? ""; - message.group_id = object.group_id ?? "0"; - message.metadata = object.metadata ?? ""; - return message; - }, -}; - -function createBaseMsgUpdateGroupMetadataResponse(): MsgUpdateGroupMetadataResponse { - return {}; -} - -export const MsgUpdateGroupMetadataResponse = { - encode(_: MsgUpdateGroupMetadataResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateGroupMetadataResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgUpdateGroupMetadataResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(_: any): MsgUpdateGroupMetadataResponse { - return {}; - }, - - toJSON(_: MsgUpdateGroupMetadataResponse): unknown { - const obj: any = {}; - return obj; - }, - - create(base?: DeepPartial): MsgUpdateGroupMetadataResponse { - return MsgUpdateGroupMetadataResponse.fromPartial(base ?? {}); - }, - fromPartial(_: DeepPartial): MsgUpdateGroupMetadataResponse { - const message = createBaseMsgUpdateGroupMetadataResponse(); - return message; - }, -}; - -function createBaseMsgCreateGroupPolicy(): MsgCreateGroupPolicy { - return { admin: "", group_id: "0", metadata: "", decision_policy: undefined }; -} - -export const MsgCreateGroupPolicy = { - encode(message: MsgCreateGroupPolicy, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.admin !== "") { - writer.uint32(10).string(message.admin); - } - if (message.group_id !== "0") { - writer.uint32(16).uint64(message.group_id); - } - if (message.metadata !== "") { - writer.uint32(26).string(message.metadata); - } - if (message.decision_policy !== undefined) { - Any.encode(message.decision_policy, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateGroupPolicy { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgCreateGroupPolicy(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.admin = reader.string(); - continue; - case 2: - if (tag !== 16) { - break; - } - - message.group_id = longToString(reader.uint64() as Long); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.metadata = reader.string(); - continue; - case 4: - if (tag !== 34) { - break; - } - - message.decision_policy = Any.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): MsgCreateGroupPolicy { - return { - admin: isSet(object.admin) ? globalThis.String(object.admin) : "", - group_id: isSet(object.group_id) ? globalThis.String(object.group_id) : "0", - metadata: isSet(object.metadata) ? globalThis.String(object.metadata) : "", - decision_policy: isSet(object.decision_policy) ? Any.fromJSON(object.decision_policy) : undefined, - }; - }, - - toJSON(message: MsgCreateGroupPolicy): unknown { - const obj: any = {}; - if (message.admin !== "") { - obj.admin = message.admin; - } - if (message.group_id !== "0") { - obj.group_id = message.group_id; - } - if (message.metadata !== "") { - obj.metadata = message.metadata; - } - if (message.decision_policy !== undefined) { - obj.decision_policy = Any.toJSON(message.decision_policy); - } - return obj; - }, - - create(base?: DeepPartial): MsgCreateGroupPolicy { - return MsgCreateGroupPolicy.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): MsgCreateGroupPolicy { - const message = createBaseMsgCreateGroupPolicy(); - message.admin = object.admin ?? ""; - message.group_id = object.group_id ?? "0"; - message.metadata = object.metadata ?? ""; - message.decision_policy = (object.decision_policy !== undefined && object.decision_policy !== null) - ? Any.fromPartial(object.decision_policy) - : undefined; - return message; - }, -}; - -function createBaseMsgCreateGroupPolicyResponse(): MsgCreateGroupPolicyResponse { - return { address: "" }; -} - -export const MsgCreateGroupPolicyResponse = { - encode(message: MsgCreateGroupPolicyResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateGroupPolicyResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgCreateGroupPolicyResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.address = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): MsgCreateGroupPolicyResponse { - return { address: isSet(object.address) ? globalThis.String(object.address) : "" }; - }, - - toJSON(message: MsgCreateGroupPolicyResponse): unknown { - const obj: any = {}; - if (message.address !== "") { - obj.address = message.address; - } - return obj; - }, - - create(base?: DeepPartial): MsgCreateGroupPolicyResponse { - return MsgCreateGroupPolicyResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): MsgCreateGroupPolicyResponse { - const message = createBaseMsgCreateGroupPolicyResponse(); - message.address = object.address ?? ""; - return message; - }, -}; - -function createBaseMsgUpdateGroupPolicyAdmin(): MsgUpdateGroupPolicyAdmin { - return { admin: "", group_policy_address: "", new_admin: "" }; -} - -export const MsgUpdateGroupPolicyAdmin = { - encode(message: MsgUpdateGroupPolicyAdmin, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.admin !== "") { - writer.uint32(10).string(message.admin); - } - if (message.group_policy_address !== "") { - writer.uint32(18).string(message.group_policy_address); - } - if (message.new_admin !== "") { - writer.uint32(26).string(message.new_admin); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateGroupPolicyAdmin { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgUpdateGroupPolicyAdmin(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.admin = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.group_policy_address = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.new_admin = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): MsgUpdateGroupPolicyAdmin { - return { - admin: isSet(object.admin) ? globalThis.String(object.admin) : "", - group_policy_address: isSet(object.group_policy_address) ? globalThis.String(object.group_policy_address) : "", - new_admin: isSet(object.new_admin) ? globalThis.String(object.new_admin) : "", - }; - }, - - toJSON(message: MsgUpdateGroupPolicyAdmin): unknown { - const obj: any = {}; - if (message.admin !== "") { - obj.admin = message.admin; - } - if (message.group_policy_address !== "") { - obj.group_policy_address = message.group_policy_address; - } - if (message.new_admin !== "") { - obj.new_admin = message.new_admin; - } - return obj; - }, - - create(base?: DeepPartial): MsgUpdateGroupPolicyAdmin { - return MsgUpdateGroupPolicyAdmin.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): MsgUpdateGroupPolicyAdmin { - const message = createBaseMsgUpdateGroupPolicyAdmin(); - message.admin = object.admin ?? ""; - message.group_policy_address = object.group_policy_address ?? ""; - message.new_admin = object.new_admin ?? ""; - return message; - }, -}; - -function createBaseMsgUpdateGroupPolicyAdminResponse(): MsgUpdateGroupPolicyAdminResponse { - return {}; -} - -export const MsgUpdateGroupPolicyAdminResponse = { - encode(_: MsgUpdateGroupPolicyAdminResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateGroupPolicyAdminResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgUpdateGroupPolicyAdminResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(_: any): MsgUpdateGroupPolicyAdminResponse { - return {}; - }, - - toJSON(_: MsgUpdateGroupPolicyAdminResponse): unknown { - const obj: any = {}; - return obj; - }, - - create(base?: DeepPartial): MsgUpdateGroupPolicyAdminResponse { - return MsgUpdateGroupPolicyAdminResponse.fromPartial(base ?? {}); - }, - fromPartial(_: DeepPartial): MsgUpdateGroupPolicyAdminResponse { - const message = createBaseMsgUpdateGroupPolicyAdminResponse(); - return message; - }, -}; - -function createBaseMsgCreateGroupWithPolicy(): MsgCreateGroupWithPolicy { - return { - admin: "", - members: [], - group_metadata: "", - group_policy_metadata: "", - group_policy_as_admin: false, - decision_policy: undefined, - }; -} - -export const MsgCreateGroupWithPolicy = { - encode(message: MsgCreateGroupWithPolicy, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.admin !== "") { - writer.uint32(10).string(message.admin); - } - for (const v of message.members) { - MemberRequest.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.group_metadata !== "") { - writer.uint32(26).string(message.group_metadata); - } - if (message.group_policy_metadata !== "") { - writer.uint32(34).string(message.group_policy_metadata); - } - if (message.group_policy_as_admin !== false) { - writer.uint32(40).bool(message.group_policy_as_admin); - } - if (message.decision_policy !== undefined) { - Any.encode(message.decision_policy, writer.uint32(50).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateGroupWithPolicy { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgCreateGroupWithPolicy(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.admin = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.members.push(MemberRequest.decode(reader, reader.uint32())); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.group_metadata = reader.string(); - continue; - case 4: - if (tag !== 34) { - break; - } - - message.group_policy_metadata = reader.string(); - continue; - case 5: - if (tag !== 40) { - break; - } - - message.group_policy_as_admin = reader.bool(); - continue; - case 6: - if (tag !== 50) { - break; - } - - message.decision_policy = Any.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): MsgCreateGroupWithPolicy { - return { - admin: isSet(object.admin) ? globalThis.String(object.admin) : "", - members: globalThis.Array.isArray(object?.members) - ? object.members.map((e: any) => MemberRequest.fromJSON(e)) - : [], - group_metadata: isSet(object.group_metadata) ? globalThis.String(object.group_metadata) : "", - group_policy_metadata: isSet(object.group_policy_metadata) ? globalThis.String(object.group_policy_metadata) : "", - group_policy_as_admin: isSet(object.group_policy_as_admin) - ? globalThis.Boolean(object.group_policy_as_admin) - : false, - decision_policy: isSet(object.decision_policy) ? Any.fromJSON(object.decision_policy) : undefined, - }; - }, - - toJSON(message: MsgCreateGroupWithPolicy): unknown { - const obj: any = {}; - if (message.admin !== "") { - obj.admin = message.admin; - } - if (message.members?.length) { - obj.members = message.members.map((e) => MemberRequest.toJSON(e)); - } - if (message.group_metadata !== "") { - obj.group_metadata = message.group_metadata; - } - if (message.group_policy_metadata !== "") { - obj.group_policy_metadata = message.group_policy_metadata; - } - if (message.group_policy_as_admin !== false) { - obj.group_policy_as_admin = message.group_policy_as_admin; - } - if (message.decision_policy !== undefined) { - obj.decision_policy = Any.toJSON(message.decision_policy); - } - return obj; - }, - - create(base?: DeepPartial): MsgCreateGroupWithPolicy { - return MsgCreateGroupWithPolicy.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): MsgCreateGroupWithPolicy { - const message = createBaseMsgCreateGroupWithPolicy(); - message.admin = object.admin ?? ""; - message.members = object.members?.map((e) => MemberRequest.fromPartial(e)) || []; - message.group_metadata = object.group_metadata ?? ""; - message.group_policy_metadata = object.group_policy_metadata ?? ""; - message.group_policy_as_admin = object.group_policy_as_admin ?? false; - message.decision_policy = (object.decision_policy !== undefined && object.decision_policy !== null) - ? Any.fromPartial(object.decision_policy) - : undefined; - return message; - }, -}; - -function createBaseMsgCreateGroupWithPolicyResponse(): MsgCreateGroupWithPolicyResponse { - return { group_id: "0", group_policy_address: "" }; -} - -export const MsgCreateGroupWithPolicyResponse = { - encode(message: MsgCreateGroupWithPolicyResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.group_id !== "0") { - writer.uint32(8).uint64(message.group_id); - } - if (message.group_policy_address !== "") { - writer.uint32(18).string(message.group_policy_address); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateGroupWithPolicyResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgCreateGroupWithPolicyResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.group_id = longToString(reader.uint64() as Long); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.group_policy_address = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): MsgCreateGroupWithPolicyResponse { - return { - group_id: isSet(object.group_id) ? globalThis.String(object.group_id) : "0", - group_policy_address: isSet(object.group_policy_address) ? globalThis.String(object.group_policy_address) : "", - }; - }, - - toJSON(message: MsgCreateGroupWithPolicyResponse): unknown { - const obj: any = {}; - if (message.group_id !== "0") { - obj.group_id = message.group_id; - } - if (message.group_policy_address !== "") { - obj.group_policy_address = message.group_policy_address; - } - return obj; - }, - - create(base?: DeepPartial): MsgCreateGroupWithPolicyResponse { - return MsgCreateGroupWithPolicyResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): MsgCreateGroupWithPolicyResponse { - const message = createBaseMsgCreateGroupWithPolicyResponse(); - message.group_id = object.group_id ?? "0"; - message.group_policy_address = object.group_policy_address ?? ""; - return message; - }, -}; - -function createBaseMsgUpdateGroupPolicyDecisionPolicy(): MsgUpdateGroupPolicyDecisionPolicy { - return { admin: "", group_policy_address: "", decision_policy: undefined }; -} - -export const MsgUpdateGroupPolicyDecisionPolicy = { - encode(message: MsgUpdateGroupPolicyDecisionPolicy, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.admin !== "") { - writer.uint32(10).string(message.admin); - } - if (message.group_policy_address !== "") { - writer.uint32(18).string(message.group_policy_address); - } - if (message.decision_policy !== undefined) { - Any.encode(message.decision_policy, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateGroupPolicyDecisionPolicy { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgUpdateGroupPolicyDecisionPolicy(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.admin = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.group_policy_address = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.decision_policy = Any.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): MsgUpdateGroupPolicyDecisionPolicy { - return { - admin: isSet(object.admin) ? globalThis.String(object.admin) : "", - group_policy_address: isSet(object.group_policy_address) ? globalThis.String(object.group_policy_address) : "", - decision_policy: isSet(object.decision_policy) ? Any.fromJSON(object.decision_policy) : undefined, - }; - }, - - toJSON(message: MsgUpdateGroupPolicyDecisionPolicy): unknown { - const obj: any = {}; - if (message.admin !== "") { - obj.admin = message.admin; - } - if (message.group_policy_address !== "") { - obj.group_policy_address = message.group_policy_address; - } - if (message.decision_policy !== undefined) { - obj.decision_policy = Any.toJSON(message.decision_policy); - } - return obj; - }, - - create(base?: DeepPartial): MsgUpdateGroupPolicyDecisionPolicy { - return MsgUpdateGroupPolicyDecisionPolicy.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): MsgUpdateGroupPolicyDecisionPolicy { - const message = createBaseMsgUpdateGroupPolicyDecisionPolicy(); - message.admin = object.admin ?? ""; - message.group_policy_address = object.group_policy_address ?? ""; - message.decision_policy = (object.decision_policy !== undefined && object.decision_policy !== null) - ? Any.fromPartial(object.decision_policy) - : undefined; - return message; - }, -}; - -function createBaseMsgUpdateGroupPolicyDecisionPolicyResponse(): MsgUpdateGroupPolicyDecisionPolicyResponse { - return {}; -} - -export const MsgUpdateGroupPolicyDecisionPolicyResponse = { - encode(_: MsgUpdateGroupPolicyDecisionPolicyResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateGroupPolicyDecisionPolicyResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgUpdateGroupPolicyDecisionPolicyResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(_: any): MsgUpdateGroupPolicyDecisionPolicyResponse { - return {}; - }, - - toJSON(_: MsgUpdateGroupPolicyDecisionPolicyResponse): unknown { - const obj: any = {}; - return obj; - }, - - create(base?: DeepPartial): MsgUpdateGroupPolicyDecisionPolicyResponse { - return MsgUpdateGroupPolicyDecisionPolicyResponse.fromPartial(base ?? {}); - }, - fromPartial(_: DeepPartial): MsgUpdateGroupPolicyDecisionPolicyResponse { - const message = createBaseMsgUpdateGroupPolicyDecisionPolicyResponse(); - return message; - }, -}; - -function createBaseMsgUpdateGroupPolicyMetadata(): MsgUpdateGroupPolicyMetadata { - return { admin: "", group_policy_address: "", metadata: "" }; -} - -export const MsgUpdateGroupPolicyMetadata = { - encode(message: MsgUpdateGroupPolicyMetadata, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.admin !== "") { - writer.uint32(10).string(message.admin); - } - if (message.group_policy_address !== "") { - writer.uint32(18).string(message.group_policy_address); - } - if (message.metadata !== "") { - writer.uint32(26).string(message.metadata); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateGroupPolicyMetadata { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgUpdateGroupPolicyMetadata(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.admin = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.group_policy_address = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.metadata = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): MsgUpdateGroupPolicyMetadata { - return { - admin: isSet(object.admin) ? globalThis.String(object.admin) : "", - group_policy_address: isSet(object.group_policy_address) ? globalThis.String(object.group_policy_address) : "", - metadata: isSet(object.metadata) ? globalThis.String(object.metadata) : "", - }; - }, - - toJSON(message: MsgUpdateGroupPolicyMetadata): unknown { - const obj: any = {}; - if (message.admin !== "") { - obj.admin = message.admin; - } - if (message.group_policy_address !== "") { - obj.group_policy_address = message.group_policy_address; - } - if (message.metadata !== "") { - obj.metadata = message.metadata; - } - return obj; - }, - - create(base?: DeepPartial): MsgUpdateGroupPolicyMetadata { - return MsgUpdateGroupPolicyMetadata.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): MsgUpdateGroupPolicyMetadata { - const message = createBaseMsgUpdateGroupPolicyMetadata(); - message.admin = object.admin ?? ""; - message.group_policy_address = object.group_policy_address ?? ""; - message.metadata = object.metadata ?? ""; - return message; - }, -}; - -function createBaseMsgUpdateGroupPolicyMetadataResponse(): MsgUpdateGroupPolicyMetadataResponse { - return {}; -} - -export const MsgUpdateGroupPolicyMetadataResponse = { - encode(_: MsgUpdateGroupPolicyMetadataResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateGroupPolicyMetadataResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgUpdateGroupPolicyMetadataResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(_: any): MsgUpdateGroupPolicyMetadataResponse { - return {}; - }, - - toJSON(_: MsgUpdateGroupPolicyMetadataResponse): unknown { - const obj: any = {}; - return obj; - }, - - create(base?: DeepPartial): MsgUpdateGroupPolicyMetadataResponse { - return MsgUpdateGroupPolicyMetadataResponse.fromPartial(base ?? {}); - }, - fromPartial(_: DeepPartial): MsgUpdateGroupPolicyMetadataResponse { - const message = createBaseMsgUpdateGroupPolicyMetadataResponse(); - return message; - }, -}; - -function createBaseMsgSubmitProposal(): MsgSubmitProposal { - return { group_policy_address: "", proposers: [], metadata: "", messages: [], exec: 0, title: "", summary: "" }; -} - -export const MsgSubmitProposal = { - encode(message: MsgSubmitProposal, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.group_policy_address !== "") { - writer.uint32(10).string(message.group_policy_address); - } - for (const v of message.proposers) { - writer.uint32(18).string(v!); - } - if (message.metadata !== "") { - writer.uint32(26).string(message.metadata); - } - for (const v of message.messages) { - Any.encode(v!, writer.uint32(34).fork()).ldelim(); - } - if (message.exec !== 0) { - writer.uint32(40).int32(message.exec); - } - if (message.title !== "") { - writer.uint32(50).string(message.title); - } - if (message.summary !== "") { - writer.uint32(58).string(message.summary); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgSubmitProposal { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgSubmitProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.group_policy_address = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.proposers.push(reader.string()); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.metadata = reader.string(); - continue; - case 4: - if (tag !== 34) { - break; - } - - message.messages.push(Any.decode(reader, reader.uint32())); - continue; - case 5: - if (tag !== 40) { - break; - } - - message.exec = reader.int32() as any; - continue; - case 6: - if (tag !== 50) { - break; - } - - message.title = reader.string(); - continue; - case 7: - if (tag !== 58) { - break; - } - - message.summary = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): MsgSubmitProposal { - return { - group_policy_address: isSet(object.group_policy_address) ? globalThis.String(object.group_policy_address) : "", - proposers: globalThis.Array.isArray(object?.proposers) - ? object.proposers.map((e: any) => globalThis.String(e)) - : [], - metadata: isSet(object.metadata) ? globalThis.String(object.metadata) : "", - messages: globalThis.Array.isArray(object?.messages) ? object.messages.map((e: any) => Any.fromJSON(e)) : [], - exec: isSet(object.exec) ? execFromJSON(object.exec) : 0, - title: isSet(object.title) ? globalThis.String(object.title) : "", - summary: isSet(object.summary) ? globalThis.String(object.summary) : "", - }; - }, - - toJSON(message: MsgSubmitProposal): unknown { - const obj: any = {}; - if (message.group_policy_address !== "") { - obj.group_policy_address = message.group_policy_address; - } - if (message.proposers?.length) { - obj.proposers = message.proposers; - } - if (message.metadata !== "") { - obj.metadata = message.metadata; - } - if (message.messages?.length) { - obj.messages = message.messages.map((e) => Any.toJSON(e)); - } - if (message.exec !== 0) { - obj.exec = execToJSON(message.exec); - } - if (message.title !== "") { - obj.title = message.title; - } - if (message.summary !== "") { - obj.summary = message.summary; - } - return obj; - }, - - create(base?: DeepPartial): MsgSubmitProposal { - return MsgSubmitProposal.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): MsgSubmitProposal { - const message = createBaseMsgSubmitProposal(); - message.group_policy_address = object.group_policy_address ?? ""; - message.proposers = object.proposers?.map((e) => e) || []; - message.metadata = object.metadata ?? ""; - message.messages = object.messages?.map((e) => Any.fromPartial(e)) || []; - message.exec = object.exec ?? 0; - message.title = object.title ?? ""; - message.summary = object.summary ?? ""; - return message; - }, -}; - -function createBaseMsgSubmitProposalResponse(): MsgSubmitProposalResponse { - return { proposal_id: "0" }; -} - -export const MsgSubmitProposalResponse = { - encode(message: MsgSubmitProposalResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.proposal_id !== "0") { - writer.uint32(8).uint64(message.proposal_id); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgSubmitProposalResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgSubmitProposalResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.proposal_id = longToString(reader.uint64() as Long); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): MsgSubmitProposalResponse { - return { proposal_id: isSet(object.proposal_id) ? globalThis.String(object.proposal_id) : "0" }; - }, - - toJSON(message: MsgSubmitProposalResponse): unknown { - const obj: any = {}; - if (message.proposal_id !== "0") { - obj.proposal_id = message.proposal_id; - } - return obj; - }, - - create(base?: DeepPartial): MsgSubmitProposalResponse { - return MsgSubmitProposalResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): MsgSubmitProposalResponse { - const message = createBaseMsgSubmitProposalResponse(); - message.proposal_id = object.proposal_id ?? "0"; - return message; - }, -}; - -function createBaseMsgWithdrawProposal(): MsgWithdrawProposal { - return { proposal_id: "0", address: "" }; -} - -export const MsgWithdrawProposal = { - encode(message: MsgWithdrawProposal, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.proposal_id !== "0") { - writer.uint32(8).uint64(message.proposal_id); - } - if (message.address !== "") { - writer.uint32(18).string(message.address); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgWithdrawProposal { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgWithdrawProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.proposal_id = longToString(reader.uint64() as Long); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.address = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): MsgWithdrawProposal { - return { - proposal_id: isSet(object.proposal_id) ? globalThis.String(object.proposal_id) : "0", - address: isSet(object.address) ? globalThis.String(object.address) : "", - }; - }, - - toJSON(message: MsgWithdrawProposal): unknown { - const obj: any = {}; - if (message.proposal_id !== "0") { - obj.proposal_id = message.proposal_id; - } - if (message.address !== "") { - obj.address = message.address; - } - return obj; - }, - - create(base?: DeepPartial): MsgWithdrawProposal { - return MsgWithdrawProposal.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): MsgWithdrawProposal { - const message = createBaseMsgWithdrawProposal(); - message.proposal_id = object.proposal_id ?? "0"; - message.address = object.address ?? ""; - return message; - }, -}; - -function createBaseMsgWithdrawProposalResponse(): MsgWithdrawProposalResponse { - return {}; -} - -export const MsgWithdrawProposalResponse = { - encode(_: MsgWithdrawProposalResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgWithdrawProposalResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgWithdrawProposalResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(_: any): MsgWithdrawProposalResponse { - return {}; - }, - - toJSON(_: MsgWithdrawProposalResponse): unknown { - const obj: any = {}; - return obj; - }, - - create(base?: DeepPartial): MsgWithdrawProposalResponse { - return MsgWithdrawProposalResponse.fromPartial(base ?? {}); - }, - fromPartial(_: DeepPartial): MsgWithdrawProposalResponse { - const message = createBaseMsgWithdrawProposalResponse(); - return message; - }, -}; - -function createBaseMsgVote(): MsgVote { - return { proposal_id: "0", voter: "", option: 0, metadata: "", exec: 0 }; -} - -export const MsgVote = { - encode(message: MsgVote, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.proposal_id !== "0") { - writer.uint32(8).uint64(message.proposal_id); - } - if (message.voter !== "") { - writer.uint32(18).string(message.voter); - } - if (message.option !== 0) { - writer.uint32(24).int32(message.option); - } - if (message.metadata !== "") { - writer.uint32(34).string(message.metadata); - } - if (message.exec !== 0) { - writer.uint32(40).int32(message.exec); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgVote { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgVote(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.proposal_id = longToString(reader.uint64() as Long); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.voter = reader.string(); - continue; - case 3: - if (tag !== 24) { - break; - } - - message.option = reader.int32() as any; - continue; - case 4: - if (tag !== 34) { - break; - } - - message.metadata = reader.string(); - continue; - case 5: - if (tag !== 40) { - break; - } - - message.exec = reader.int32() as any; - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): MsgVote { - return { - proposal_id: isSet(object.proposal_id) ? globalThis.String(object.proposal_id) : "0", - voter: isSet(object.voter) ? globalThis.String(object.voter) : "", - option: isSet(object.option) ? voteOptionFromJSON(object.option) : 0, - metadata: isSet(object.metadata) ? globalThis.String(object.metadata) : "", - exec: isSet(object.exec) ? execFromJSON(object.exec) : 0, - }; - }, - - toJSON(message: MsgVote): unknown { - const obj: any = {}; - if (message.proposal_id !== "0") { - obj.proposal_id = message.proposal_id; - } - if (message.voter !== "") { - obj.voter = message.voter; - } - if (message.option !== 0) { - obj.option = voteOptionToJSON(message.option); - } - if (message.metadata !== "") { - obj.metadata = message.metadata; - } - if (message.exec !== 0) { - obj.exec = execToJSON(message.exec); - } - return obj; - }, - - create(base?: DeepPartial): MsgVote { - return MsgVote.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): MsgVote { - const message = createBaseMsgVote(); - message.proposal_id = object.proposal_id ?? "0"; - message.voter = object.voter ?? ""; - message.option = object.option ?? 0; - message.metadata = object.metadata ?? ""; - message.exec = object.exec ?? 0; - return message; - }, -}; - -function createBaseMsgVoteResponse(): MsgVoteResponse { - return {}; -} - -export const MsgVoteResponse = { - encode(_: MsgVoteResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgVoteResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgVoteResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(_: any): MsgVoteResponse { - return {}; - }, - - toJSON(_: MsgVoteResponse): unknown { - const obj: any = {}; - return obj; - }, - - create(base?: DeepPartial): MsgVoteResponse { - return MsgVoteResponse.fromPartial(base ?? {}); - }, - fromPartial(_: DeepPartial): MsgVoteResponse { - const message = createBaseMsgVoteResponse(); - return message; - }, -}; - -function createBaseMsgExec(): MsgExec { - return { proposal_id: "0", executor: "" }; -} - -export const MsgExec = { - encode(message: MsgExec, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.proposal_id !== "0") { - writer.uint32(8).uint64(message.proposal_id); - } - if (message.executor !== "") { - writer.uint32(18).string(message.executor); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgExec { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgExec(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.proposal_id = longToString(reader.uint64() as Long); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.executor = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): MsgExec { - return { - proposal_id: isSet(object.proposal_id) ? globalThis.String(object.proposal_id) : "0", - executor: isSet(object.executor) ? globalThis.String(object.executor) : "", - }; - }, - - toJSON(message: MsgExec): unknown { - const obj: any = {}; - if (message.proposal_id !== "0") { - obj.proposal_id = message.proposal_id; - } - if (message.executor !== "") { - obj.executor = message.executor; - } - return obj; - }, - - create(base?: DeepPartial): MsgExec { - return MsgExec.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): MsgExec { - const message = createBaseMsgExec(); - message.proposal_id = object.proposal_id ?? "0"; - message.executor = object.executor ?? ""; - return message; - }, -}; - -function createBaseMsgExecResponse(): MsgExecResponse { - return { result: 0 }; -} - -export const MsgExecResponse = { - encode(message: MsgExecResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.result !== 0) { - writer.uint32(16).int32(message.result); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgExecResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgExecResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - if (tag !== 16) { - break; - } - - message.result = reader.int32() as any; - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): MsgExecResponse { - return { result: isSet(object.result) ? proposalExecutorResultFromJSON(object.result) : 0 }; - }, - - toJSON(message: MsgExecResponse): unknown { - const obj: any = {}; - if (message.result !== 0) { - obj.result = proposalExecutorResultToJSON(message.result); - } - return obj; - }, - - create(base?: DeepPartial): MsgExecResponse { - return MsgExecResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): MsgExecResponse { - const message = createBaseMsgExecResponse(); - message.result = object.result ?? 0; - return message; - }, -}; - -function createBaseMsgLeaveGroup(): MsgLeaveGroup { - return { address: "", group_id: "0" }; -} - -export const MsgLeaveGroup = { - encode(message: MsgLeaveGroup, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.group_id !== "0") { - writer.uint32(16).uint64(message.group_id); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgLeaveGroup { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgLeaveGroup(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.address = reader.string(); - continue; - case 2: - if (tag !== 16) { - break; - } - - message.group_id = longToString(reader.uint64() as Long); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): MsgLeaveGroup { - return { - address: isSet(object.address) ? globalThis.String(object.address) : "", - group_id: isSet(object.group_id) ? globalThis.String(object.group_id) : "0", - }; - }, - - toJSON(message: MsgLeaveGroup): unknown { - const obj: any = {}; - if (message.address !== "") { - obj.address = message.address; - } - if (message.group_id !== "0") { - obj.group_id = message.group_id; - } - return obj; - }, - - create(base?: DeepPartial): MsgLeaveGroup { - return MsgLeaveGroup.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): MsgLeaveGroup { - const message = createBaseMsgLeaveGroup(); - message.address = object.address ?? ""; - message.group_id = object.group_id ?? "0"; - return message; - }, -}; - -function createBaseMsgLeaveGroupResponse(): MsgLeaveGroupResponse { - return {}; -} - -export const MsgLeaveGroupResponse = { - encode(_: MsgLeaveGroupResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgLeaveGroupResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgLeaveGroupResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(_: any): MsgLeaveGroupResponse { - return {}; - }, - - toJSON(_: MsgLeaveGroupResponse): unknown { - const obj: any = {}; - return obj; - }, - - create(base?: DeepPartial): MsgLeaveGroupResponse { - return MsgLeaveGroupResponse.fromPartial(base ?? {}); - }, - fromPartial(_: DeepPartial): MsgLeaveGroupResponse { - const message = createBaseMsgLeaveGroupResponse(); - return message; - }, -}; - -/** Msg is the cosmos.group.v1 Msg service. */ -export interface Msg { - /** CreateGroup creates a new group with an admin account address, a list of members and some optional metadata. */ - CreateGroup(request: MsgCreateGroup): Promise; - /** UpdateGroupMembers updates the group members with given group id and admin address. */ - UpdateGroupMembers(request: MsgUpdateGroupMembers): Promise; - /** UpdateGroupAdmin updates the group admin with given group id and previous admin address. */ - UpdateGroupAdmin(request: MsgUpdateGroupAdmin): Promise; - /** UpdateGroupMetadata updates the group metadata with given group id and admin address. */ - UpdateGroupMetadata(request: MsgUpdateGroupMetadata): Promise; - /** CreateGroupPolicy creates a new group policy using given DecisionPolicy. */ - CreateGroupPolicy(request: MsgCreateGroupPolicy): Promise; - /** CreateGroupWithPolicy creates a new group with policy. */ - CreateGroupWithPolicy(request: MsgCreateGroupWithPolicy): Promise; - /** UpdateGroupPolicyAdmin updates a group policy admin. */ - UpdateGroupPolicyAdmin(request: MsgUpdateGroupPolicyAdmin): Promise; - /** UpdateGroupPolicyDecisionPolicy allows a group policy's decision policy to be updated. */ - UpdateGroupPolicyDecisionPolicy( - request: MsgUpdateGroupPolicyDecisionPolicy, - ): Promise; - /** UpdateGroupPolicyMetadata updates a group policy metadata. */ - UpdateGroupPolicyMetadata(request: MsgUpdateGroupPolicyMetadata): Promise; - /** SubmitProposal submits a new proposal. */ - SubmitProposal(request: MsgSubmitProposal): Promise; - /** WithdrawProposal withdraws a proposal. */ - WithdrawProposal(request: MsgWithdrawProposal): Promise; - /** Vote allows a voter to vote on a proposal. */ - Vote(request: MsgVote): Promise; - /** Exec executes a proposal. */ - Exec(request: MsgExec): Promise; - /** LeaveGroup allows a group member to leave the group. */ - LeaveGroup(request: MsgLeaveGroup): Promise; -} - -export const MsgServiceName = "cosmos.group.v1.Msg"; -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - private readonly service: string; - constructor(rpc: Rpc, opts?: { service?: string }) { - this.service = opts?.service || MsgServiceName; - this.rpc = rpc; - this.CreateGroup = this.CreateGroup.bind(this); - this.UpdateGroupMembers = this.UpdateGroupMembers.bind(this); - this.UpdateGroupAdmin = this.UpdateGroupAdmin.bind(this); - this.UpdateGroupMetadata = this.UpdateGroupMetadata.bind(this); - this.CreateGroupPolicy = this.CreateGroupPolicy.bind(this); - this.CreateGroupWithPolicy = this.CreateGroupWithPolicy.bind(this); - this.UpdateGroupPolicyAdmin = this.UpdateGroupPolicyAdmin.bind(this); - this.UpdateGroupPolicyDecisionPolicy = this.UpdateGroupPolicyDecisionPolicy.bind(this); - this.UpdateGroupPolicyMetadata = this.UpdateGroupPolicyMetadata.bind(this); - this.SubmitProposal = this.SubmitProposal.bind(this); - this.WithdrawProposal = this.WithdrawProposal.bind(this); - this.Vote = this.Vote.bind(this); - this.Exec = this.Exec.bind(this); - this.LeaveGroup = this.LeaveGroup.bind(this); - } - CreateGroup(request: MsgCreateGroup): Promise { - const data = MsgCreateGroup.encode(request).finish(); - const promise = this.rpc.request(this.service, "CreateGroup", data); - return promise.then((data) => MsgCreateGroupResponse.decode(_m0.Reader.create(data))); - } - - UpdateGroupMembers(request: MsgUpdateGroupMembers): Promise { - const data = MsgUpdateGroupMembers.encode(request).finish(); - const promise = this.rpc.request(this.service, "UpdateGroupMembers", data); - return promise.then((data) => MsgUpdateGroupMembersResponse.decode(_m0.Reader.create(data))); - } - - UpdateGroupAdmin(request: MsgUpdateGroupAdmin): Promise { - const data = MsgUpdateGroupAdmin.encode(request).finish(); - const promise = this.rpc.request(this.service, "UpdateGroupAdmin", data); - return promise.then((data) => MsgUpdateGroupAdminResponse.decode(_m0.Reader.create(data))); - } - - UpdateGroupMetadata(request: MsgUpdateGroupMetadata): Promise { - const data = MsgUpdateGroupMetadata.encode(request).finish(); - const promise = this.rpc.request(this.service, "UpdateGroupMetadata", data); - return promise.then((data) => MsgUpdateGroupMetadataResponse.decode(_m0.Reader.create(data))); - } - - CreateGroupPolicy(request: MsgCreateGroupPolicy): Promise { - const data = MsgCreateGroupPolicy.encode(request).finish(); - const promise = this.rpc.request(this.service, "CreateGroupPolicy", data); - return promise.then((data) => MsgCreateGroupPolicyResponse.decode(_m0.Reader.create(data))); - } - - CreateGroupWithPolicy(request: MsgCreateGroupWithPolicy): Promise { - const data = MsgCreateGroupWithPolicy.encode(request).finish(); - const promise = this.rpc.request(this.service, "CreateGroupWithPolicy", data); - return promise.then((data) => MsgCreateGroupWithPolicyResponse.decode(_m0.Reader.create(data))); - } - - UpdateGroupPolicyAdmin(request: MsgUpdateGroupPolicyAdmin): Promise { - const data = MsgUpdateGroupPolicyAdmin.encode(request).finish(); - const promise = this.rpc.request(this.service, "UpdateGroupPolicyAdmin", data); - return promise.then((data) => MsgUpdateGroupPolicyAdminResponse.decode(_m0.Reader.create(data))); - } - - UpdateGroupPolicyDecisionPolicy( - request: MsgUpdateGroupPolicyDecisionPolicy, - ): Promise { - const data = MsgUpdateGroupPolicyDecisionPolicy.encode(request).finish(); - const promise = this.rpc.request(this.service, "UpdateGroupPolicyDecisionPolicy", data); - return promise.then((data) => MsgUpdateGroupPolicyDecisionPolicyResponse.decode(_m0.Reader.create(data))); - } - - UpdateGroupPolicyMetadata(request: MsgUpdateGroupPolicyMetadata): Promise { - const data = MsgUpdateGroupPolicyMetadata.encode(request).finish(); - const promise = this.rpc.request(this.service, "UpdateGroupPolicyMetadata", data); - return promise.then((data) => MsgUpdateGroupPolicyMetadataResponse.decode(_m0.Reader.create(data))); - } - - SubmitProposal(request: MsgSubmitProposal): Promise { - const data = MsgSubmitProposal.encode(request).finish(); - const promise = this.rpc.request(this.service, "SubmitProposal", data); - return promise.then((data) => MsgSubmitProposalResponse.decode(_m0.Reader.create(data))); - } - - WithdrawProposal(request: MsgWithdrawProposal): Promise { - const data = MsgWithdrawProposal.encode(request).finish(); - const promise = this.rpc.request(this.service, "WithdrawProposal", data); - return promise.then((data) => MsgWithdrawProposalResponse.decode(_m0.Reader.create(data))); - } - - Vote(request: MsgVote): Promise { - const data = MsgVote.encode(request).finish(); - const promise = this.rpc.request(this.service, "Vote", data); - return promise.then((data) => MsgVoteResponse.decode(_m0.Reader.create(data))); - } - - Exec(request: MsgExec): Promise { - const data = MsgExec.encode(request).finish(); - const promise = this.rpc.request(this.service, "Exec", data); - return promise.then((data) => MsgExecResponse.decode(_m0.Reader.create(data))); - } - - LeaveGroup(request: MsgLeaveGroup): Promise { - const data = MsgLeaveGroup.encode(request).finish(); - const promise = this.rpc.request(this.service, "LeaveGroup", data); - return promise.then((data) => MsgLeaveGroupResponse.decode(_m0.Reader.create(data))); - } -} - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin ? T - : T extends globalThis.Array ? globalThis.Array> - : T extends ReadonlyArray ? ReadonlyArray> - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/protobuf/cosmos/group/v1/types.ts b/src/protobuf/cosmos/group/v1/types.ts deleted file mode 100644 index f70f4066..00000000 --- a/src/protobuf/cosmos/group/v1/types.ts +++ /dev/null @@ -1,1801 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 -// source: cosmos/group/v1/types.proto - -/* eslint-disable */ -import Long from "long"; -import * as _m0 from "protobufjs/minimal"; -import { Any } from "../../../google/protobuf/any"; -import { Duration } from "../../../google/protobuf/duration"; -import { Timestamp } from "../../../google/protobuf/timestamp"; - -export const protobufPackage = "cosmos.group.v1"; - -/** Since: cosmos-sdk 0.46 */ - -/** VoteOption enumerates the valid vote options for a given proposal. */ -export enum VoteOption { - /** - * VOTE_OPTION_UNSPECIFIED - VOTE_OPTION_UNSPECIFIED defines an unspecified vote option which will - * return an error. - */ - VOTE_OPTION_UNSPECIFIED = 0, - /** VOTE_OPTION_YES - VOTE_OPTION_YES defines a yes vote option. */ - VOTE_OPTION_YES = 1, - /** VOTE_OPTION_ABSTAIN - VOTE_OPTION_ABSTAIN defines an abstain vote option. */ - VOTE_OPTION_ABSTAIN = 2, - /** VOTE_OPTION_NO - VOTE_OPTION_NO defines a no vote option. */ - VOTE_OPTION_NO = 3, - /** VOTE_OPTION_NO_WITH_VETO - VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. */ - VOTE_OPTION_NO_WITH_VETO = 4, - UNRECOGNIZED = -1, -} - -export function voteOptionFromJSON(object: any): VoteOption { - switch (object) { - case 0: - case "VOTE_OPTION_UNSPECIFIED": - return VoteOption.VOTE_OPTION_UNSPECIFIED; - case 1: - case "VOTE_OPTION_YES": - return VoteOption.VOTE_OPTION_YES; - case 2: - case "VOTE_OPTION_ABSTAIN": - return VoteOption.VOTE_OPTION_ABSTAIN; - case 3: - case "VOTE_OPTION_NO": - return VoteOption.VOTE_OPTION_NO; - case 4: - case "VOTE_OPTION_NO_WITH_VETO": - return VoteOption.VOTE_OPTION_NO_WITH_VETO; - case -1: - case "UNRECOGNIZED": - default: - return VoteOption.UNRECOGNIZED; - } -} - -export function voteOptionToJSON(object: VoteOption): string { - switch (object) { - case VoteOption.VOTE_OPTION_UNSPECIFIED: - return "VOTE_OPTION_UNSPECIFIED"; - case VoteOption.VOTE_OPTION_YES: - return "VOTE_OPTION_YES"; - case VoteOption.VOTE_OPTION_ABSTAIN: - return "VOTE_OPTION_ABSTAIN"; - case VoteOption.VOTE_OPTION_NO: - return "VOTE_OPTION_NO"; - case VoteOption.VOTE_OPTION_NO_WITH_VETO: - return "VOTE_OPTION_NO_WITH_VETO"; - case VoteOption.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -/** ProposalStatus defines proposal statuses. */ -export enum ProposalStatus { - /** PROPOSAL_STATUS_UNSPECIFIED - An empty value is invalid and not allowed. */ - PROPOSAL_STATUS_UNSPECIFIED = 0, - /** PROPOSAL_STATUS_SUBMITTED - Initial status of a proposal when submitted. */ - PROPOSAL_STATUS_SUBMITTED = 1, - /** - * 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_ACCEPTED = 2, - /** - * 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_REJECTED = 3, - /** - * PROPOSAL_STATUS_ABORTED - Final status of a proposal when the group policy is modified before the - * final tally. - */ - PROPOSAL_STATUS_ABORTED = 4, - /** - * PROPOSAL_STATUS_WITHDRAWN - A proposal can be withdrawn before the voting start time by the owner. - * When this happens the final status is Withdrawn. - */ - PROPOSAL_STATUS_WITHDRAWN = 5, - UNRECOGNIZED = -1, -} - -export function proposalStatusFromJSON(object: any): ProposalStatus { - switch (object) { - case 0: - case "PROPOSAL_STATUS_UNSPECIFIED": - return ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED; - case 1: - case "PROPOSAL_STATUS_SUBMITTED": - return ProposalStatus.PROPOSAL_STATUS_SUBMITTED; - case 2: - case "PROPOSAL_STATUS_ACCEPTED": - return ProposalStatus.PROPOSAL_STATUS_ACCEPTED; - case 3: - case "PROPOSAL_STATUS_REJECTED": - return ProposalStatus.PROPOSAL_STATUS_REJECTED; - case 4: - case "PROPOSAL_STATUS_ABORTED": - return ProposalStatus.PROPOSAL_STATUS_ABORTED; - case 5: - case "PROPOSAL_STATUS_WITHDRAWN": - return ProposalStatus.PROPOSAL_STATUS_WITHDRAWN; - case -1: - case "UNRECOGNIZED": - default: - return ProposalStatus.UNRECOGNIZED; - } -} - -export function proposalStatusToJSON(object: ProposalStatus): string { - switch (object) { - case ProposalStatus.PROPOSAL_STATUS_UNSPECIFIED: - return "PROPOSAL_STATUS_UNSPECIFIED"; - case ProposalStatus.PROPOSAL_STATUS_SUBMITTED: - return "PROPOSAL_STATUS_SUBMITTED"; - case ProposalStatus.PROPOSAL_STATUS_ACCEPTED: - return "PROPOSAL_STATUS_ACCEPTED"; - case ProposalStatus.PROPOSAL_STATUS_REJECTED: - return "PROPOSAL_STATUS_REJECTED"; - case ProposalStatus.PROPOSAL_STATUS_ABORTED: - return "PROPOSAL_STATUS_ABORTED"; - case ProposalStatus.PROPOSAL_STATUS_WITHDRAWN: - return "PROPOSAL_STATUS_WITHDRAWN"; - case ProposalStatus.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -/** ProposalExecutorResult defines types of proposal executor results. */ -export enum ProposalExecutorResult { - /** PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED - An empty value is not allowed. */ - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED = 0, - /** PROPOSAL_EXECUTOR_RESULT_NOT_RUN - We have not yet run the executor. */ - PROPOSAL_EXECUTOR_RESULT_NOT_RUN = 1, - /** PROPOSAL_EXECUTOR_RESULT_SUCCESS - The executor was successful and proposed action updated state. */ - PROPOSAL_EXECUTOR_RESULT_SUCCESS = 2, - /** PROPOSAL_EXECUTOR_RESULT_FAILURE - The executor returned an error and proposed action didn't update state. */ - PROPOSAL_EXECUTOR_RESULT_FAILURE = 3, - UNRECOGNIZED = -1, -} - -export function proposalExecutorResultFromJSON(object: any): ProposalExecutorResult { - switch (object) { - case 0: - case "PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED": - return ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED; - case 1: - case "PROPOSAL_EXECUTOR_RESULT_NOT_RUN": - return ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_NOT_RUN; - case 2: - case "PROPOSAL_EXECUTOR_RESULT_SUCCESS": - return ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_SUCCESS; - case 3: - case "PROPOSAL_EXECUTOR_RESULT_FAILURE": - return ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_FAILURE; - case -1: - case "UNRECOGNIZED": - default: - return ProposalExecutorResult.UNRECOGNIZED; - } -} - -export function proposalExecutorResultToJSON(object: ProposalExecutorResult): string { - switch (object) { - case ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED: - return "PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED"; - case ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_NOT_RUN: - return "PROPOSAL_EXECUTOR_RESULT_NOT_RUN"; - case ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_SUCCESS: - return "PROPOSAL_EXECUTOR_RESULT_SUCCESS"; - case ProposalExecutorResult.PROPOSAL_EXECUTOR_RESULT_FAILURE: - return "PROPOSAL_EXECUTOR_RESULT_FAILURE"; - case ProposalExecutorResult.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -/** - * Member represents a group member with an account address, - * non-zero weight, metadata and added_at timestamp. - */ -export interface Member { - /** address is the member's account address. */ - address: string; - /** weight is the member's voting weight that should be greater than 0. */ - weight: string; - /** metadata is any arbitrary metadata attached to the member. */ - metadata: string; - /** added_at is a timestamp specifying when a member was added. */ - added_at?: Timestamp | undefined; -} - -/** - * 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. - */ -export interface MemberRequest { - /** address is the member's account address. */ - address: string; - /** weight is the member's voting weight that should be greater than 0. */ - weight: string; - /** metadata is any arbitrary metadata attached to the member. */ - metadata: string; -} - -/** - * ThresholdDecisionPolicy is a decision policy where a proposal passes when it - * satisfies the two following conditions: - * 1. The sum of all `YES` voter's weights is greater or equal than the defined - * `threshold`. - * 2. The voting and execution periods of the proposal respect the parameters - * given by `windows`. - */ -export interface ThresholdDecisionPolicy { - /** - * threshold is the minimum weighted sum of `YES` votes that must be met or - * exceeded for a proposal to succeed. - */ - threshold: string; - /** windows defines the different windows for voting and execution. */ - windows?: DecisionPolicyWindows | undefined; -} - -/** - * PercentageDecisionPolicy is a decision policy where a proposal passes when - * it satisfies the two following conditions: - * 1. The percentage of all `YES` voters' weights out of the total group weight - * is greater or equal than the given `percentage`. - * 2. The voting and execution periods of the proposal respect the parameters - * given by `windows`. - */ -export interface PercentageDecisionPolicy { - /** - * percentage is the minimum percentage of the weighted sum of `YES` votes must - * meet for a proposal to succeed. - */ - percentage: string; - /** windows defines the different windows for voting and execution. */ - windows?: DecisionPolicyWindows | undefined; -} - -/** DecisionPolicyWindows defines the different windows for voting and execution. */ -export interface DecisionPolicyWindows { - /** - * voting_period is the duration from submission of a proposal to the end of voting period - * Within this times votes can be submitted with MsgVote. - */ - voting_period?: - | Duration - | undefined; - /** - * min_execution_period is the minimum duration after the proposal submission - * where members can start sending MsgExec. This means that the window for - * sending a MsgExec transaction is: - * `[ submission + min_execution_period ; submission + voting_period + max_execution_period]` - * where max_execution_period is a app-specific config, defined in the keeper. - * If not set, min_execution_period will default to 0. - * - * Please make sure to set a `min_execution_period` that is smaller than - * `voting_period + max_execution_period`, or else the above execution window - * is empty, meaning that all proposals created with this decision policy - * won't be able to be executed. - */ - min_execution_period?: Duration | undefined; -} - -/** GroupInfo represents the high-level on-chain information for a group. */ -export interface GroupInfo { - /** id is the unique ID of the group. */ - id: string; - /** admin is the account address of the group's admin. */ - admin: string; - /** - * 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 - */ - metadata: string; - /** - * 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 - */ - version: string; - /** total_weight is the sum of the group members' weights. */ - total_weight: string; - /** created_at is a timestamp specifying when a group was created. */ - created_at?: Timestamp | undefined; -} - -/** GroupMember represents the relationship between a group and a member. */ -export interface GroupMember { - /** group_id is the unique ID of the group. */ - group_id: string; - /** member is the member data. */ - member?: Member | undefined; -} - -/** GroupPolicyInfo represents the high-level on-chain information for a group policy. */ -export interface GroupPolicyInfo { - /** address is the account address of group policy. */ - address: string; - /** group_id is the unique ID of the group. */ - group_id: string; - /** admin is the account address of the group admin. */ - admin: string; - /** - * 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 - */ - metadata: string; - /** - * version is used to track changes to a group's GroupPolicyInfo structure that - * would create a different result on a running proposal. - */ - version: string; - /** decision_policy specifies the group policy's decision policy. */ - decision_policy?: - | Any - | undefined; - /** created_at is a timestamp specifying when a group policy was created. */ - created_at?: Timestamp | undefined; -} - -/** - * 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. - */ -export interface Proposal { - /** id is the unique id of the proposal. */ - id: string; - /** group_policy_address is the account address of group policy. */ - group_policy_address: string; - /** - * 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 - */ - metadata: string; - /** proposers are the account addresses of the proposers. */ - proposers: string[]; - /** submit_time is a timestamp specifying when a proposal was submitted. */ - submit_time?: - | Timestamp - | undefined; - /** - * group_version tracks the version of the group at proposal submission. - * This field is here for informational purposes only. - */ - group_version: string; - /** - * 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. - */ - group_policy_version: string; - /** status represents the high level position in the life cycle of the proposal. Initial value is Submitted. */ - status: ProposalStatus; - /** - * 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. - */ - final_tally_result?: - | TallyResult - | undefined; - /** - * 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. - */ - voting_period_end?: - | Timestamp - | undefined; - /** executor_result is the final result of the proposal execution. Initial value is NotRun. */ - executor_result: ProposalExecutorResult; - /** messages is a list of `sdk.Msg`s that will be executed if the proposal passes. */ - messages: Any[]; - /** - * title is the title of the proposal - * - * Since: cosmos-sdk 0.47 - */ - title: string; - /** - * summary is a short summary of the proposal - * - * Since: cosmos-sdk 0.47 - */ - summary: string; -} - -/** TallyResult represents the sum of weighted votes for each vote option. */ -export interface TallyResult { - /** yes_count is the weighted sum of yes votes. */ - yes_count: string; - /** abstain_count is the weighted sum of abstainers. */ - abstain_count: string; - /** no_count is the weighted sum of no votes. */ - no_count: string; - /** no_with_veto_count is the weighted sum of veto. */ - no_with_veto_count: string; -} - -/** Vote represents a vote for a proposal.string metadata */ -export interface Vote { - /** proposal is the unique ID of the proposal. */ - proposal_id: string; - /** voter is the account address of the voter. */ - voter: string; - /** option is the voter's choice on the proposal. */ - option: VoteOption; - /** - * 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 - */ - metadata: string; - /** submit_time is the timestamp when the vote was submitted. */ - submit_time?: Timestamp | undefined; -} - -function createBaseMember(): Member { - return { address: "", weight: "", metadata: "", added_at: undefined }; -} - -export const Member = { - encode(message: Member, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.weight !== "") { - writer.uint32(18).string(message.weight); - } - if (message.metadata !== "") { - writer.uint32(26).string(message.metadata); - } - if (message.added_at !== undefined) { - Timestamp.encode(message.added_at, writer.uint32(34).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Member { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMember(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.address = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.weight = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.metadata = reader.string(); - continue; - case 4: - if (tag !== 34) { - break; - } - - message.added_at = Timestamp.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): Member { - return { - address: isSet(object.address) ? globalThis.String(object.address) : "", - weight: isSet(object.weight) ? globalThis.String(object.weight) : "", - metadata: isSet(object.metadata) ? globalThis.String(object.metadata) : "", - added_at: isSet(object.added_at) ? fromJsonTimestamp(object.added_at) : undefined, - }; - }, - - toJSON(message: Member): unknown { - const obj: any = {}; - if (message.address !== "") { - obj.address = message.address; - } - if (message.weight !== "") { - obj.weight = message.weight; - } - if (message.metadata !== "") { - obj.metadata = message.metadata; - } - if (message.added_at !== undefined) { - obj.added_at = fromTimestamp(message.added_at).toISOString(); - } - return obj; - }, - - create(base?: DeepPartial): Member { - return Member.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): Member { - const message = createBaseMember(); - message.address = object.address ?? ""; - message.weight = object.weight ?? ""; - message.metadata = object.metadata ?? ""; - message.added_at = (object.added_at !== undefined && object.added_at !== null) - ? Timestamp.fromPartial(object.added_at) - : undefined; - return message; - }, -}; - -function createBaseMemberRequest(): MemberRequest { - return { address: "", weight: "", metadata: "" }; -} - -export const MemberRequest = { - encode(message: MemberRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.weight !== "") { - writer.uint32(18).string(message.weight); - } - if (message.metadata !== "") { - writer.uint32(26).string(message.metadata); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MemberRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMemberRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.address = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.weight = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.metadata = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): MemberRequest { - return { - address: isSet(object.address) ? globalThis.String(object.address) : "", - weight: isSet(object.weight) ? globalThis.String(object.weight) : "", - metadata: isSet(object.metadata) ? globalThis.String(object.metadata) : "", - }; - }, - - toJSON(message: MemberRequest): unknown { - const obj: any = {}; - if (message.address !== "") { - obj.address = message.address; - } - if (message.weight !== "") { - obj.weight = message.weight; - } - if (message.metadata !== "") { - obj.metadata = message.metadata; - } - return obj; - }, - - create(base?: DeepPartial): MemberRequest { - return MemberRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): MemberRequest { - const message = createBaseMemberRequest(); - message.address = object.address ?? ""; - message.weight = object.weight ?? ""; - message.metadata = object.metadata ?? ""; - return message; - }, -}; - -function createBaseThresholdDecisionPolicy(): ThresholdDecisionPolicy { - return { threshold: "", windows: undefined }; -} - -export const ThresholdDecisionPolicy = { - encode(message: ThresholdDecisionPolicy, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.threshold !== "") { - writer.uint32(10).string(message.threshold); - } - if (message.windows !== undefined) { - DecisionPolicyWindows.encode(message.windows, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): ThresholdDecisionPolicy { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseThresholdDecisionPolicy(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.threshold = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.windows = DecisionPolicyWindows.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): ThresholdDecisionPolicy { - return { - threshold: isSet(object.threshold) ? globalThis.String(object.threshold) : "", - windows: isSet(object.windows) ? DecisionPolicyWindows.fromJSON(object.windows) : undefined, - }; - }, - - toJSON(message: ThresholdDecisionPolicy): unknown { - const obj: any = {}; - if (message.threshold !== "") { - obj.threshold = message.threshold; - } - if (message.windows !== undefined) { - obj.windows = DecisionPolicyWindows.toJSON(message.windows); - } - return obj; - }, - - create(base?: DeepPartial): ThresholdDecisionPolicy { - return ThresholdDecisionPolicy.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): ThresholdDecisionPolicy { - const message = createBaseThresholdDecisionPolicy(); - message.threshold = object.threshold ?? ""; - message.windows = (object.windows !== undefined && object.windows !== null) - ? DecisionPolicyWindows.fromPartial(object.windows) - : undefined; - return message; - }, -}; - -function createBasePercentageDecisionPolicy(): PercentageDecisionPolicy { - return { percentage: "", windows: undefined }; -} - -export const PercentageDecisionPolicy = { - encode(message: PercentageDecisionPolicy, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.percentage !== "") { - writer.uint32(10).string(message.percentage); - } - if (message.windows !== undefined) { - DecisionPolicyWindows.encode(message.windows, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): PercentageDecisionPolicy { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePercentageDecisionPolicy(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.percentage = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.windows = DecisionPolicyWindows.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): PercentageDecisionPolicy { - return { - percentage: isSet(object.percentage) ? globalThis.String(object.percentage) : "", - windows: isSet(object.windows) ? DecisionPolicyWindows.fromJSON(object.windows) : undefined, - }; - }, - - toJSON(message: PercentageDecisionPolicy): unknown { - const obj: any = {}; - if (message.percentage !== "") { - obj.percentage = message.percentage; - } - if (message.windows !== undefined) { - obj.windows = DecisionPolicyWindows.toJSON(message.windows); - } - return obj; - }, - - create(base?: DeepPartial): PercentageDecisionPolicy { - return PercentageDecisionPolicy.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): PercentageDecisionPolicy { - const message = createBasePercentageDecisionPolicy(); - message.percentage = object.percentage ?? ""; - message.windows = (object.windows !== undefined && object.windows !== null) - ? DecisionPolicyWindows.fromPartial(object.windows) - : undefined; - return message; - }, -}; - -function createBaseDecisionPolicyWindows(): DecisionPolicyWindows { - return { voting_period: undefined, min_execution_period: undefined }; -} - -export const DecisionPolicyWindows = { - encode(message: DecisionPolicyWindows, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.voting_period !== undefined) { - Duration.encode(message.voting_period, writer.uint32(10).fork()).ldelim(); - } - if (message.min_execution_period !== undefined) { - Duration.encode(message.min_execution_period, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): DecisionPolicyWindows { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDecisionPolicyWindows(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.voting_period = Duration.decode(reader, reader.uint32()); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.min_execution_period = Duration.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): DecisionPolicyWindows { - return { - voting_period: isSet(object.voting_period) ? Duration.fromJSON(object.voting_period) : undefined, - min_execution_period: isSet(object.min_execution_period) - ? Duration.fromJSON(object.min_execution_period) - : undefined, - }; - }, - - toJSON(message: DecisionPolicyWindows): unknown { - const obj: any = {}; - if (message.voting_period !== undefined) { - obj.voting_period = Duration.toJSON(message.voting_period); - } - if (message.min_execution_period !== undefined) { - obj.min_execution_period = Duration.toJSON(message.min_execution_period); - } - return obj; - }, - - create(base?: DeepPartial): DecisionPolicyWindows { - return DecisionPolicyWindows.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): DecisionPolicyWindows { - const message = createBaseDecisionPolicyWindows(); - message.voting_period = (object.voting_period !== undefined && object.voting_period !== null) - ? Duration.fromPartial(object.voting_period) - : undefined; - message.min_execution_period = (object.min_execution_period !== undefined && object.min_execution_period !== null) - ? Duration.fromPartial(object.min_execution_period) - : undefined; - return message; - }, -}; - -function createBaseGroupInfo(): GroupInfo { - return { id: "0", admin: "", metadata: "", version: "0", total_weight: "", created_at: undefined }; -} - -export const GroupInfo = { - encode(message: GroupInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.id !== "0") { - writer.uint32(8).uint64(message.id); - } - if (message.admin !== "") { - writer.uint32(18).string(message.admin); - } - if (message.metadata !== "") { - writer.uint32(26).string(message.metadata); - } - if (message.version !== "0") { - writer.uint32(32).uint64(message.version); - } - if (message.total_weight !== "") { - writer.uint32(42).string(message.total_weight); - } - if (message.created_at !== undefined) { - Timestamp.encode(message.created_at, writer.uint32(50).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): GroupInfo { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGroupInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.id = longToString(reader.uint64() as Long); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.admin = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.metadata = reader.string(); - continue; - case 4: - if (tag !== 32) { - break; - } - - message.version = longToString(reader.uint64() as Long); - continue; - case 5: - if (tag !== 42) { - break; - } - - message.total_weight = reader.string(); - continue; - case 6: - if (tag !== 50) { - break; - } - - message.created_at = Timestamp.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): GroupInfo { - return { - id: isSet(object.id) ? globalThis.String(object.id) : "0", - admin: isSet(object.admin) ? globalThis.String(object.admin) : "", - metadata: isSet(object.metadata) ? globalThis.String(object.metadata) : "", - version: isSet(object.version) ? globalThis.String(object.version) : "0", - total_weight: isSet(object.total_weight) ? globalThis.String(object.total_weight) : "", - created_at: isSet(object.created_at) ? fromJsonTimestamp(object.created_at) : undefined, - }; - }, - - toJSON(message: GroupInfo): unknown { - const obj: any = {}; - if (message.id !== "0") { - obj.id = message.id; - } - if (message.admin !== "") { - obj.admin = message.admin; - } - if (message.metadata !== "") { - obj.metadata = message.metadata; - } - if (message.version !== "0") { - obj.version = message.version; - } - if (message.total_weight !== "") { - obj.total_weight = message.total_weight; - } - if (message.created_at !== undefined) { - obj.created_at = fromTimestamp(message.created_at).toISOString(); - } - return obj; - }, - - create(base?: DeepPartial): GroupInfo { - return GroupInfo.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): GroupInfo { - const message = createBaseGroupInfo(); - message.id = object.id ?? "0"; - message.admin = object.admin ?? ""; - message.metadata = object.metadata ?? ""; - message.version = object.version ?? "0"; - message.total_weight = object.total_weight ?? ""; - message.created_at = (object.created_at !== undefined && object.created_at !== null) - ? Timestamp.fromPartial(object.created_at) - : undefined; - return message; - }, -}; - -function createBaseGroupMember(): GroupMember { - return { group_id: "0", member: undefined }; -} - -export const GroupMember = { - encode(message: GroupMember, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.group_id !== "0") { - writer.uint32(8).uint64(message.group_id); - } - if (message.member !== undefined) { - Member.encode(message.member, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): GroupMember { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGroupMember(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.group_id = longToString(reader.uint64() as Long); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.member = Member.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): GroupMember { - return { - group_id: isSet(object.group_id) ? globalThis.String(object.group_id) : "0", - member: isSet(object.member) ? Member.fromJSON(object.member) : undefined, - }; - }, - - toJSON(message: GroupMember): unknown { - const obj: any = {}; - if (message.group_id !== "0") { - obj.group_id = message.group_id; - } - if (message.member !== undefined) { - obj.member = Member.toJSON(message.member); - } - return obj; - }, - - create(base?: DeepPartial): GroupMember { - return GroupMember.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): GroupMember { - const message = createBaseGroupMember(); - message.group_id = object.group_id ?? "0"; - message.member = (object.member !== undefined && object.member !== null) - ? Member.fromPartial(object.member) - : undefined; - return message; - }, -}; - -function createBaseGroupPolicyInfo(): GroupPolicyInfo { - return { - address: "", - group_id: "0", - admin: "", - metadata: "", - version: "0", - decision_policy: undefined, - created_at: undefined, - }; -} - -export const GroupPolicyInfo = { - encode(message: GroupPolicyInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.group_id !== "0") { - writer.uint32(16).uint64(message.group_id); - } - if (message.admin !== "") { - writer.uint32(26).string(message.admin); - } - if (message.metadata !== "") { - writer.uint32(34).string(message.metadata); - } - if (message.version !== "0") { - writer.uint32(40).uint64(message.version); - } - if (message.decision_policy !== undefined) { - Any.encode(message.decision_policy, writer.uint32(50).fork()).ldelim(); - } - if (message.created_at !== undefined) { - Timestamp.encode(message.created_at, writer.uint32(58).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): GroupPolicyInfo { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGroupPolicyInfo(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.address = reader.string(); - continue; - case 2: - if (tag !== 16) { - break; - } - - message.group_id = longToString(reader.uint64() as Long); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.admin = reader.string(); - continue; - case 4: - if (tag !== 34) { - break; - } - - message.metadata = reader.string(); - continue; - case 5: - if (tag !== 40) { - break; - } - - message.version = longToString(reader.uint64() as Long); - continue; - case 6: - if (tag !== 50) { - break; - } - - message.decision_policy = Any.decode(reader, reader.uint32()); - continue; - case 7: - if (tag !== 58) { - break; - } - - message.created_at = Timestamp.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): GroupPolicyInfo { - return { - address: isSet(object.address) ? globalThis.String(object.address) : "", - group_id: isSet(object.group_id) ? globalThis.String(object.group_id) : "0", - admin: isSet(object.admin) ? globalThis.String(object.admin) : "", - metadata: isSet(object.metadata) ? globalThis.String(object.metadata) : "", - version: isSet(object.version) ? globalThis.String(object.version) : "0", - decision_policy: isSet(object.decision_policy) ? Any.fromJSON(object.decision_policy) : undefined, - created_at: isSet(object.created_at) ? fromJsonTimestamp(object.created_at) : undefined, - }; - }, - - toJSON(message: GroupPolicyInfo): unknown { - const obj: any = {}; - if (message.address !== "") { - obj.address = message.address; - } - if (message.group_id !== "0") { - obj.group_id = message.group_id; - } - if (message.admin !== "") { - obj.admin = message.admin; - } - if (message.metadata !== "") { - obj.metadata = message.metadata; - } - if (message.version !== "0") { - obj.version = message.version; - } - if (message.decision_policy !== undefined) { - obj.decision_policy = Any.toJSON(message.decision_policy); - } - if (message.created_at !== undefined) { - obj.created_at = fromTimestamp(message.created_at).toISOString(); - } - return obj; - }, - - create(base?: DeepPartial): GroupPolicyInfo { - return GroupPolicyInfo.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): GroupPolicyInfo { - const message = createBaseGroupPolicyInfo(); - message.address = object.address ?? ""; - message.group_id = object.group_id ?? "0"; - message.admin = object.admin ?? ""; - message.metadata = object.metadata ?? ""; - message.version = object.version ?? "0"; - message.decision_policy = (object.decision_policy !== undefined && object.decision_policy !== null) - ? Any.fromPartial(object.decision_policy) - : undefined; - message.created_at = (object.created_at !== undefined && object.created_at !== null) - ? Timestamp.fromPartial(object.created_at) - : undefined; - return message; - }, -}; - -function createBaseProposal(): Proposal { - return { - id: "0", - group_policy_address: "", - metadata: "", - proposers: [], - submit_time: undefined, - group_version: "0", - group_policy_version: "0", - status: 0, - final_tally_result: undefined, - voting_period_end: undefined, - executor_result: 0, - messages: [], - title: "", - summary: "", - }; -} - -export const Proposal = { - encode(message: Proposal, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.id !== "0") { - writer.uint32(8).uint64(message.id); - } - if (message.group_policy_address !== "") { - writer.uint32(18).string(message.group_policy_address); - } - if (message.metadata !== "") { - writer.uint32(26).string(message.metadata); - } - for (const v of message.proposers) { - writer.uint32(34).string(v!); - } - if (message.submit_time !== undefined) { - Timestamp.encode(message.submit_time, writer.uint32(42).fork()).ldelim(); - } - if (message.group_version !== "0") { - writer.uint32(48).uint64(message.group_version); - } - if (message.group_policy_version !== "0") { - writer.uint32(56).uint64(message.group_policy_version); - } - if (message.status !== 0) { - writer.uint32(64).int32(message.status); - } - if (message.final_tally_result !== undefined) { - TallyResult.encode(message.final_tally_result, writer.uint32(74).fork()).ldelim(); - } - if (message.voting_period_end !== undefined) { - Timestamp.encode(message.voting_period_end, writer.uint32(82).fork()).ldelim(); - } - if (message.executor_result !== 0) { - writer.uint32(88).int32(message.executor_result); - } - for (const v of message.messages) { - Any.encode(v!, writer.uint32(98).fork()).ldelim(); - } - if (message.title !== "") { - writer.uint32(106).string(message.title); - } - if (message.summary !== "") { - writer.uint32(114).string(message.summary); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Proposal { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseProposal(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.id = longToString(reader.uint64() as Long); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.group_policy_address = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.metadata = reader.string(); - continue; - case 4: - if (tag !== 34) { - break; - } - - message.proposers.push(reader.string()); - continue; - case 5: - if (tag !== 42) { - break; - } - - message.submit_time = Timestamp.decode(reader, reader.uint32()); - continue; - case 6: - if (tag !== 48) { - break; - } - - message.group_version = longToString(reader.uint64() as Long); - continue; - case 7: - if (tag !== 56) { - break; - } - - message.group_policy_version = longToString(reader.uint64() as Long); - continue; - case 8: - if (tag !== 64) { - break; - } - - message.status = reader.int32() as any; - continue; - case 9: - if (tag !== 74) { - break; - } - - message.final_tally_result = TallyResult.decode(reader, reader.uint32()); - continue; - case 10: - if (tag !== 82) { - break; - } - - message.voting_period_end = Timestamp.decode(reader, reader.uint32()); - continue; - case 11: - if (tag !== 88) { - break; - } - - message.executor_result = reader.int32() as any; - continue; - case 12: - if (tag !== 98) { - break; - } - - message.messages.push(Any.decode(reader, reader.uint32())); - continue; - case 13: - if (tag !== 106) { - break; - } - - message.title = reader.string(); - continue; - case 14: - if (tag !== 114) { - break; - } - - message.summary = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): Proposal { - return { - id: isSet(object.id) ? globalThis.String(object.id) : "0", - group_policy_address: isSet(object.group_policy_address) ? globalThis.String(object.group_policy_address) : "", - metadata: isSet(object.metadata) ? globalThis.String(object.metadata) : "", - proposers: globalThis.Array.isArray(object?.proposers) - ? object.proposers.map((e: any) => globalThis.String(e)) - : [], - submit_time: isSet(object.submit_time) ? fromJsonTimestamp(object.submit_time) : undefined, - group_version: isSet(object.group_version) ? globalThis.String(object.group_version) : "0", - group_policy_version: isSet(object.group_policy_version) ? globalThis.String(object.group_policy_version) : "0", - status: isSet(object.status) ? proposalStatusFromJSON(object.status) : 0, - final_tally_result: isSet(object.final_tally_result) - ? TallyResult.fromJSON(object.final_tally_result) - : undefined, - voting_period_end: isSet(object.voting_period_end) ? fromJsonTimestamp(object.voting_period_end) : undefined, - executor_result: isSet(object.executor_result) ? proposalExecutorResultFromJSON(object.executor_result) : 0, - messages: globalThis.Array.isArray(object?.messages) ? object.messages.map((e: any) => Any.fromJSON(e)) : [], - title: isSet(object.title) ? globalThis.String(object.title) : "", - summary: isSet(object.summary) ? globalThis.String(object.summary) : "", - }; - }, - - toJSON(message: Proposal): unknown { - const obj: any = {}; - if (message.id !== "0") { - obj.id = message.id; - } - if (message.group_policy_address !== "") { - obj.group_policy_address = message.group_policy_address; - } - if (message.metadata !== "") { - obj.metadata = message.metadata; - } - if (message.proposers?.length) { - obj.proposers = message.proposers; - } - if (message.submit_time !== undefined) { - obj.submit_time = fromTimestamp(message.submit_time).toISOString(); - } - if (message.group_version !== "0") { - obj.group_version = message.group_version; - } - if (message.group_policy_version !== "0") { - obj.group_policy_version = message.group_policy_version; - } - if (message.status !== 0) { - obj.status = proposalStatusToJSON(message.status); - } - if (message.final_tally_result !== undefined) { - obj.final_tally_result = TallyResult.toJSON(message.final_tally_result); - } - if (message.voting_period_end !== undefined) { - obj.voting_period_end = fromTimestamp(message.voting_period_end).toISOString(); - } - if (message.executor_result !== 0) { - obj.executor_result = proposalExecutorResultToJSON(message.executor_result); - } - if (message.messages?.length) { - obj.messages = message.messages.map((e) => Any.toJSON(e)); - } - if (message.title !== "") { - obj.title = message.title; - } - if (message.summary !== "") { - obj.summary = message.summary; - } - return obj; - }, - - create(base?: DeepPartial): Proposal { - return Proposal.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): Proposal { - const message = createBaseProposal(); - message.id = object.id ?? "0"; - message.group_policy_address = object.group_policy_address ?? ""; - message.metadata = object.metadata ?? ""; - message.proposers = object.proposers?.map((e) => e) || []; - message.submit_time = (object.submit_time !== undefined && object.submit_time !== null) - ? Timestamp.fromPartial(object.submit_time) - : undefined; - message.group_version = object.group_version ?? "0"; - message.group_policy_version = object.group_policy_version ?? "0"; - message.status = object.status ?? 0; - message.final_tally_result = (object.final_tally_result !== undefined && object.final_tally_result !== null) - ? TallyResult.fromPartial(object.final_tally_result) - : undefined; - message.voting_period_end = (object.voting_period_end !== undefined && object.voting_period_end !== null) - ? Timestamp.fromPartial(object.voting_period_end) - : undefined; - message.executor_result = object.executor_result ?? 0; - message.messages = object.messages?.map((e) => Any.fromPartial(e)) || []; - message.title = object.title ?? ""; - message.summary = object.summary ?? ""; - return message; - }, -}; - -function createBaseTallyResult(): TallyResult { - return { yes_count: "", abstain_count: "", no_count: "", no_with_veto_count: "" }; -} - -export const TallyResult = { - encode(message: TallyResult, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.yes_count !== "") { - writer.uint32(10).string(message.yes_count); - } - if (message.abstain_count !== "") { - writer.uint32(18).string(message.abstain_count); - } - if (message.no_count !== "") { - writer.uint32(26).string(message.no_count); - } - if (message.no_with_veto_count !== "") { - writer.uint32(34).string(message.no_with_veto_count); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): TallyResult { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTallyResult(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.yes_count = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.abstain_count = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.no_count = reader.string(); - continue; - case 4: - if (tag !== 34) { - break; - } - - message.no_with_veto_count = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): TallyResult { - return { - yes_count: isSet(object.yes_count) ? globalThis.String(object.yes_count) : "", - abstain_count: isSet(object.abstain_count) ? globalThis.String(object.abstain_count) : "", - no_count: isSet(object.no_count) ? globalThis.String(object.no_count) : "", - no_with_veto_count: isSet(object.no_with_veto_count) ? globalThis.String(object.no_with_veto_count) : "", - }; - }, - - toJSON(message: TallyResult): unknown { - const obj: any = {}; - if (message.yes_count !== "") { - obj.yes_count = message.yes_count; - } - if (message.abstain_count !== "") { - obj.abstain_count = message.abstain_count; - } - if (message.no_count !== "") { - obj.no_count = message.no_count; - } - if (message.no_with_veto_count !== "") { - obj.no_with_veto_count = message.no_with_veto_count; - } - return obj; - }, - - create(base?: DeepPartial): TallyResult { - return TallyResult.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): TallyResult { - const message = createBaseTallyResult(); - message.yes_count = object.yes_count ?? ""; - message.abstain_count = object.abstain_count ?? ""; - message.no_count = object.no_count ?? ""; - message.no_with_veto_count = object.no_with_veto_count ?? ""; - return message; - }, -}; - -function createBaseVote(): Vote { - return { proposal_id: "0", voter: "", option: 0, metadata: "", submit_time: undefined }; -} - -export const Vote = { - encode(message: Vote, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.proposal_id !== "0") { - writer.uint32(8).uint64(message.proposal_id); - } - if (message.voter !== "") { - writer.uint32(18).string(message.voter); - } - if (message.option !== 0) { - writer.uint32(24).int32(message.option); - } - if (message.metadata !== "") { - writer.uint32(34).string(message.metadata); - } - if (message.submit_time !== undefined) { - Timestamp.encode(message.submit_time, writer.uint32(42).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Vote { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseVote(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.proposal_id = longToString(reader.uint64() as Long); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.voter = reader.string(); - continue; - case 3: - if (tag !== 24) { - break; - } - - message.option = reader.int32() as any; - continue; - case 4: - if (tag !== 34) { - break; - } - - message.metadata = reader.string(); - continue; - case 5: - if (tag !== 42) { - break; - } - - message.submit_time = Timestamp.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): Vote { - return { - proposal_id: isSet(object.proposal_id) ? globalThis.String(object.proposal_id) : "0", - voter: isSet(object.voter) ? globalThis.String(object.voter) : "", - option: isSet(object.option) ? voteOptionFromJSON(object.option) : 0, - metadata: isSet(object.metadata) ? globalThis.String(object.metadata) : "", - submit_time: isSet(object.submit_time) ? fromJsonTimestamp(object.submit_time) : undefined, - }; - }, - - toJSON(message: Vote): unknown { - const obj: any = {}; - if (message.proposal_id !== "0") { - obj.proposal_id = message.proposal_id; - } - if (message.voter !== "") { - obj.voter = message.voter; - } - if (message.option !== 0) { - obj.option = voteOptionToJSON(message.option); - } - if (message.metadata !== "") { - obj.metadata = message.metadata; - } - if (message.submit_time !== undefined) { - obj.submit_time = fromTimestamp(message.submit_time).toISOString(); - } - return obj; - }, - - create(base?: DeepPartial): Vote { - return Vote.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): Vote { - const message = createBaseVote(); - message.proposal_id = object.proposal_id ?? "0"; - message.voter = object.voter ?? ""; - message.option = object.option ?? 0; - message.metadata = object.metadata ?? ""; - message.submit_time = (object.submit_time !== undefined && object.submit_time !== null) - ? Timestamp.fromPartial(object.submit_time) - : undefined; - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin ? T - : T extends globalThis.Array ? globalThis.Array> - : T extends ReadonlyArray ? ReadonlyArray> - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -function toTimestamp(date: Date): Timestamp { - const seconds = Math.trunc(date.getTime() / 1_000).toString(); - const nanos = (date.getTime() % 1_000) * 1_000_000; - return { seconds, nanos }; -} - -function fromTimestamp(t: Timestamp): Date { - let millis = (globalThis.Number(t.seconds) || 0) * 1_000; - millis += (t.nanos || 0) / 1_000_000; - return new globalThis.Date(millis); -} - -function fromJsonTimestamp(o: any): Timestamp { - if (o instanceof globalThis.Date) { - return toTimestamp(o); - } else if (typeof o === "string") { - return toTimestamp(new globalThis.Date(o)); - } else { - return Timestamp.fromJSON(o); - } -} - -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/protobuf/cosmos/ics23/v1/proofs.ts b/src/protobuf/cosmos/ics23/v1/proofs.ts index f65b20f5..10d9983d 100644 --- a/src/protobuf/cosmos/ics23/v1/proofs.ts +++ b/src/protobuf/cosmos/ics23/v1/proofs.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/ics23/v1/proofs.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/mint/module/v1/module.ts b/src/protobuf/cosmos/mint/module/v1/module.ts index 82961e86..812a9c5d 100644 --- a/src/protobuf/cosmos/mint/module/v1/module.ts +++ b/src/protobuf/cosmos/mint/module/v1/module.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/mint/module/v1/module.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/mint/v1beta1/genesis.ts b/src/protobuf/cosmos/mint/v1beta1/genesis.ts index d79790c9..7b1b6b7c 100644 --- a/src/protobuf/cosmos/mint/v1beta1/genesis.ts +++ b/src/protobuf/cosmos/mint/v1beta1/genesis.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/mint/v1beta1/genesis.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/mint/v1beta1/mint.ts b/src/protobuf/cosmos/mint/v1beta1/mint.ts index 5e9e8691..4b78d1c5 100644 --- a/src/protobuf/cosmos/mint/v1beta1/mint.ts +++ b/src/protobuf/cosmos/mint/v1beta1/mint.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/mint/v1beta1/mint.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/mint/v1beta1/query.ts b/src/protobuf/cosmos/mint/v1beta1/query.ts index 8a336865..5cc3ac90 100644 --- a/src/protobuf/cosmos/mint/v1beta1/query.ts +++ b/src/protobuf/cosmos/mint/v1beta1/query.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/mint/v1beta1/query.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/mint/v1beta1/tx.ts b/src/protobuf/cosmos/mint/v1beta1/tx.ts index 14f78868..5cfef5d9 100644 --- a/src/protobuf/cosmos/mint/v1beta1/tx.ts +++ b/src/protobuf/cosmos/mint/v1beta1/tx.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/mint/v1beta1/tx.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/msg/textual/v1/textual.ts b/src/protobuf/cosmos/msg/textual/v1/textual.ts index 1f0f0747..90eac54d 100644 --- a/src/protobuf/cosmos/msg/textual/v1/textual.ts +++ b/src/protobuf/cosmos/msg/textual/v1/textual.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/msg/textual/v1/textual.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/msg/v1/msg.ts b/src/protobuf/cosmos/msg/v1/msg.ts index 9d019c18..106b591c 100644 --- a/src/protobuf/cosmos/msg/v1/msg.ts +++ b/src/protobuf/cosmos/msg/v1/msg.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/msg/v1/msg.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/nft/module/v1/module.ts b/src/protobuf/cosmos/nft/module/v1/module.ts deleted file mode 100644 index 31e2f52d..00000000 --- a/src/protobuf/cosmos/nft/module/v1/module.ts +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 -// source: cosmos/nft/module/v1/module.proto - -/* eslint-disable */ -import * as _m0 from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.nft.module.v1"; - -/** Module is the config object of the nft module. */ -export interface Module { -} - -function createBaseModule(): Module { - return {}; -} - -export const Module = { - encode(_: Module, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Module { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseModule(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(_: any): Module { - return {}; - }, - - toJSON(_: Module): unknown { - const obj: any = {}; - return obj; - }, - - create(base?: DeepPartial): Module { - return Module.fromPartial(base ?? {}); - }, - fromPartial(_: DeepPartial): Module { - const message = createBaseModule(); - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin ? T - : T extends globalThis.Array ? globalThis.Array> - : T extends ReadonlyArray ? ReadonlyArray> - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; diff --git a/src/protobuf/cosmos/nft/v1beta1/event.ts b/src/protobuf/cosmos/nft/v1beta1/event.ts deleted file mode 100644 index 5ae93d47..00000000 --- a/src/protobuf/cosmos/nft/v1beta1/event.ts +++ /dev/null @@ -1,336 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 -// source: cosmos/nft/v1beta1/event.proto - -/* eslint-disable */ -import * as _m0 from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.nft.v1beta1"; - -/** EventSend is emitted on Msg/Send */ -export interface EventSend { - /** class_id associated with the nft */ - class_id: string; - /** id is a unique identifier of the nft */ - id: string; - /** sender is the address of the owner of nft */ - sender: string; - /** receiver is the receiver address of nft */ - receiver: string; -} - -/** EventMint is emitted on Mint */ -export interface EventMint { - /** class_id associated with the nft */ - class_id: string; - /** id is a unique identifier of the nft */ - id: string; - /** owner is the owner address of the nft */ - owner: string; -} - -/** EventBurn is emitted on Burn */ -export interface EventBurn { - /** class_id associated with the nft */ - class_id: string; - /** id is a unique identifier of the nft */ - id: string; - /** owner is the owner address of the nft */ - owner: string; -} - -function createBaseEventSend(): EventSend { - return { class_id: "", id: "", sender: "", receiver: "" }; -} - -export const EventSend = { - encode(message: EventSend, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.class_id !== "") { - writer.uint32(10).string(message.class_id); - } - if (message.id !== "") { - writer.uint32(18).string(message.id); - } - if (message.sender !== "") { - writer.uint32(26).string(message.sender); - } - if (message.receiver !== "") { - writer.uint32(34).string(message.receiver); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): EventSend { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEventSend(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.class_id = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.id = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.sender = reader.string(); - continue; - case 4: - if (tag !== 34) { - break; - } - - message.receiver = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): EventSend { - return { - class_id: isSet(object.class_id) ? globalThis.String(object.class_id) : "", - id: isSet(object.id) ? globalThis.String(object.id) : "", - sender: isSet(object.sender) ? globalThis.String(object.sender) : "", - receiver: isSet(object.receiver) ? globalThis.String(object.receiver) : "", - }; - }, - - toJSON(message: EventSend): unknown { - const obj: any = {}; - if (message.class_id !== "") { - obj.class_id = message.class_id; - } - if (message.id !== "") { - obj.id = message.id; - } - if (message.sender !== "") { - obj.sender = message.sender; - } - if (message.receiver !== "") { - obj.receiver = message.receiver; - } - return obj; - }, - - create(base?: DeepPartial): EventSend { - return EventSend.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): EventSend { - const message = createBaseEventSend(); - message.class_id = object.class_id ?? ""; - message.id = object.id ?? ""; - message.sender = object.sender ?? ""; - message.receiver = object.receiver ?? ""; - return message; - }, -}; - -function createBaseEventMint(): EventMint { - return { class_id: "", id: "", owner: "" }; -} - -export const EventMint = { - encode(message: EventMint, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.class_id !== "") { - writer.uint32(10).string(message.class_id); - } - if (message.id !== "") { - writer.uint32(18).string(message.id); - } - if (message.owner !== "") { - writer.uint32(26).string(message.owner); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): EventMint { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEventMint(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.class_id = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.id = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.owner = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): EventMint { - return { - class_id: isSet(object.class_id) ? globalThis.String(object.class_id) : "", - id: isSet(object.id) ? globalThis.String(object.id) : "", - owner: isSet(object.owner) ? globalThis.String(object.owner) : "", - }; - }, - - toJSON(message: EventMint): unknown { - const obj: any = {}; - if (message.class_id !== "") { - obj.class_id = message.class_id; - } - if (message.id !== "") { - obj.id = message.id; - } - if (message.owner !== "") { - obj.owner = message.owner; - } - return obj; - }, - - create(base?: DeepPartial): EventMint { - return EventMint.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): EventMint { - const message = createBaseEventMint(); - message.class_id = object.class_id ?? ""; - message.id = object.id ?? ""; - message.owner = object.owner ?? ""; - return message; - }, -}; - -function createBaseEventBurn(): EventBurn { - return { class_id: "", id: "", owner: "" }; -} - -export const EventBurn = { - encode(message: EventBurn, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.class_id !== "") { - writer.uint32(10).string(message.class_id); - } - if (message.id !== "") { - writer.uint32(18).string(message.id); - } - if (message.owner !== "") { - writer.uint32(26).string(message.owner); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): EventBurn { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEventBurn(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.class_id = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.id = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.owner = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): EventBurn { - return { - class_id: isSet(object.class_id) ? globalThis.String(object.class_id) : "", - id: isSet(object.id) ? globalThis.String(object.id) : "", - owner: isSet(object.owner) ? globalThis.String(object.owner) : "", - }; - }, - - toJSON(message: EventBurn): unknown { - const obj: any = {}; - if (message.class_id !== "") { - obj.class_id = message.class_id; - } - if (message.id !== "") { - obj.id = message.id; - } - if (message.owner !== "") { - obj.owner = message.owner; - } - return obj; - }, - - create(base?: DeepPartial): EventBurn { - return EventBurn.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): EventBurn { - const message = createBaseEventBurn(); - message.class_id = object.class_id ?? ""; - message.id = object.id ?? ""; - message.owner = object.owner ?? ""; - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin ? T - : T extends globalThis.Array ? globalThis.Array> - : T extends ReadonlyArray ? ReadonlyArray> - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/protobuf/cosmos/nft/v1beta1/genesis.ts b/src/protobuf/cosmos/nft/v1beta1/genesis.ts deleted file mode 100644 index 58618d97..00000000 --- a/src/protobuf/cosmos/nft/v1beta1/genesis.ts +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 -// source: cosmos/nft/v1beta1/genesis.proto - -/* eslint-disable */ -import * as _m0 from "protobufjs/minimal"; -import { Class, NFT } from "./nft"; - -export const protobufPackage = "cosmos.nft.v1beta1"; - -/** GenesisState defines the nft module's genesis state. */ -export interface GenesisState { - /** class defines the class of the nft type. */ - classes: Class[]; - /** entry defines all nft owned by a person. */ - entries: Entry[]; -} - -/** Entry Defines all nft owned by a person */ -export interface Entry { - /** owner is the owner address of the following nft */ - owner: string; - /** nfts is a group of nfts of the same owner */ - nfts: NFT[]; -} - -function createBaseGenesisState(): GenesisState { - return { classes: [], entries: [] }; -} - -export const GenesisState = { - encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.classes) { - Class.encode(v!, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.entries) { - Entry.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.classes.push(Class.decode(reader, reader.uint32())); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.entries.push(Entry.decode(reader, reader.uint32())); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): GenesisState { - return { - classes: globalThis.Array.isArray(object?.classes) ? object.classes.map((e: any) => Class.fromJSON(e)) : [], - entries: globalThis.Array.isArray(object?.entries) ? object.entries.map((e: any) => Entry.fromJSON(e)) : [], - }; - }, - - toJSON(message: GenesisState): unknown { - const obj: any = {}; - if (message.classes?.length) { - obj.classes = message.classes.map((e) => Class.toJSON(e)); - } - if (message.entries?.length) { - obj.entries = message.entries.map((e) => Entry.toJSON(e)); - } - return obj; - }, - - create(base?: DeepPartial): GenesisState { - return GenesisState.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): GenesisState { - const message = createBaseGenesisState(); - message.classes = object.classes?.map((e) => Class.fromPartial(e)) || []; - message.entries = object.entries?.map((e) => Entry.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseEntry(): Entry { - return { owner: "", nfts: [] }; -} - -export const Entry = { - encode(message: Entry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.owner !== "") { - writer.uint32(10).string(message.owner); - } - for (const v of message.nfts) { - NFT.encode(v!, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Entry { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEntry(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.owner = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.nfts.push(NFT.decode(reader, reader.uint32())); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): Entry { - return { - owner: isSet(object.owner) ? globalThis.String(object.owner) : "", - nfts: globalThis.Array.isArray(object?.nfts) ? object.nfts.map((e: any) => NFT.fromJSON(e)) : [], - }; - }, - - toJSON(message: Entry): unknown { - const obj: any = {}; - if (message.owner !== "") { - obj.owner = message.owner; - } - if (message.nfts?.length) { - obj.nfts = message.nfts.map((e) => NFT.toJSON(e)); - } - return obj; - }, - - create(base?: DeepPartial): Entry { - return Entry.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): Entry { - const message = createBaseEntry(); - message.owner = object.owner ?? ""; - message.nfts = object.nfts?.map((e) => NFT.fromPartial(e)) || []; - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin ? T - : T extends globalThis.Array ? globalThis.Array> - : T extends ReadonlyArray ? ReadonlyArray> - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/protobuf/cosmos/nft/v1beta1/nft.ts b/src/protobuf/cosmos/nft/v1beta1/nft.ts deleted file mode 100644 index 7c2d8ed3..00000000 --- a/src/protobuf/cosmos/nft/v1beta1/nft.ts +++ /dev/null @@ -1,323 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 -// source: cosmos/nft/v1beta1/nft.proto - -/* eslint-disable */ -import * as _m0 from "protobufjs/minimal"; -import { Any } from "../../../google/protobuf/any"; - -export const protobufPackage = "cosmos.nft.v1beta1"; - -/** Class defines the class of the nft type. */ -export interface Class { - /** id defines the unique identifier of the NFT classification, similar to the contract address of ERC721 */ - id: string; - /** name defines the human-readable name of the NFT classification. Optional */ - name: string; - /** symbol is an abbreviated name for nft classification. Optional */ - symbol: string; - /** description is a brief description of nft classification. Optional */ - description: string; - /** uri for the class metadata stored off chain. It can define schema for Class and NFT `Data` attributes. Optional */ - uri: string; - /** uri_hash is a hash of the document pointed by uri. Optional */ - uri_hash: string; - /** data is the app specific metadata of the NFT class. Optional */ - data?: Any | undefined; -} - -/** NFT defines the NFT. */ -export interface NFT { - /** class_id associated with the NFT, similar to the contract address of ERC721 */ - class_id: string; - /** id is a unique identifier of the NFT */ - id: string; - /** uri for the NFT metadata stored off chain */ - uri: string; - /** uri_hash is a hash of the document pointed by uri */ - uri_hash: string; - /** data is an app specific data of the NFT. Optional */ - data?: Any | undefined; -} - -function createBaseClass(): Class { - return { id: "", name: "", symbol: "", description: "", uri: "", uri_hash: "", data: undefined }; -} - -export const Class = { - encode(message: Class, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.id !== "") { - writer.uint32(10).string(message.id); - } - if (message.name !== "") { - writer.uint32(18).string(message.name); - } - if (message.symbol !== "") { - writer.uint32(26).string(message.symbol); - } - if (message.description !== "") { - writer.uint32(34).string(message.description); - } - if (message.uri !== "") { - writer.uint32(42).string(message.uri); - } - if (message.uri_hash !== "") { - writer.uint32(50).string(message.uri_hash); - } - if (message.data !== undefined) { - Any.encode(message.data, writer.uint32(58).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Class { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseClass(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.id = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.name = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.symbol = reader.string(); - continue; - case 4: - if (tag !== 34) { - break; - } - - message.description = reader.string(); - continue; - case 5: - if (tag !== 42) { - break; - } - - message.uri = reader.string(); - continue; - case 6: - if (tag !== 50) { - break; - } - - message.uri_hash = reader.string(); - continue; - case 7: - if (tag !== 58) { - break; - } - - message.data = Any.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): Class { - return { - id: isSet(object.id) ? globalThis.String(object.id) : "", - name: isSet(object.name) ? globalThis.String(object.name) : "", - symbol: isSet(object.symbol) ? globalThis.String(object.symbol) : "", - description: isSet(object.description) ? globalThis.String(object.description) : "", - uri: isSet(object.uri) ? globalThis.String(object.uri) : "", - uri_hash: isSet(object.uri_hash) ? globalThis.String(object.uri_hash) : "", - data: isSet(object.data) ? Any.fromJSON(object.data) : undefined, - }; - }, - - toJSON(message: Class): unknown { - const obj: any = {}; - if (message.id !== "") { - obj.id = message.id; - } - if (message.name !== "") { - obj.name = message.name; - } - if (message.symbol !== "") { - obj.symbol = message.symbol; - } - if (message.description !== "") { - obj.description = message.description; - } - if (message.uri !== "") { - obj.uri = message.uri; - } - if (message.uri_hash !== "") { - obj.uri_hash = message.uri_hash; - } - if (message.data !== undefined) { - obj.data = Any.toJSON(message.data); - } - return obj; - }, - - create(base?: DeepPartial): Class { - return Class.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): Class { - const message = createBaseClass(); - message.id = object.id ?? ""; - message.name = object.name ?? ""; - message.symbol = object.symbol ?? ""; - message.description = object.description ?? ""; - message.uri = object.uri ?? ""; - message.uri_hash = object.uri_hash ?? ""; - message.data = (object.data !== undefined && object.data !== null) ? Any.fromPartial(object.data) : undefined; - return message; - }, -}; - -function createBaseNFT(): NFT { - return { class_id: "", id: "", uri: "", uri_hash: "", data: undefined }; -} - -export const NFT = { - encode(message: NFT, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.class_id !== "") { - writer.uint32(10).string(message.class_id); - } - if (message.id !== "") { - writer.uint32(18).string(message.id); - } - if (message.uri !== "") { - writer.uint32(26).string(message.uri); - } - if (message.uri_hash !== "") { - writer.uint32(34).string(message.uri_hash); - } - if (message.data !== undefined) { - Any.encode(message.data, writer.uint32(82).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): NFT { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseNFT(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.class_id = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.id = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.uri = reader.string(); - continue; - case 4: - if (tag !== 34) { - break; - } - - message.uri_hash = reader.string(); - continue; - case 10: - if (tag !== 82) { - break; - } - - message.data = Any.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): NFT { - return { - class_id: isSet(object.class_id) ? globalThis.String(object.class_id) : "", - id: isSet(object.id) ? globalThis.String(object.id) : "", - uri: isSet(object.uri) ? globalThis.String(object.uri) : "", - uri_hash: isSet(object.uri_hash) ? globalThis.String(object.uri_hash) : "", - data: isSet(object.data) ? Any.fromJSON(object.data) : undefined, - }; - }, - - toJSON(message: NFT): unknown { - const obj: any = {}; - if (message.class_id !== "") { - obj.class_id = message.class_id; - } - if (message.id !== "") { - obj.id = message.id; - } - if (message.uri !== "") { - obj.uri = message.uri; - } - if (message.uri_hash !== "") { - obj.uri_hash = message.uri_hash; - } - if (message.data !== undefined) { - obj.data = Any.toJSON(message.data); - } - return obj; - }, - - create(base?: DeepPartial): NFT { - return NFT.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): NFT { - const message = createBaseNFT(); - message.class_id = object.class_id ?? ""; - message.id = object.id ?? ""; - message.uri = object.uri ?? ""; - message.uri_hash = object.uri_hash ?? ""; - message.data = (object.data !== undefined && object.data !== null) ? Any.fromPartial(object.data) : undefined; - return message; - }, -}; - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin ? T - : T extends globalThis.Array ? globalThis.Array> - : T extends ReadonlyArray ? ReadonlyArray> - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/protobuf/cosmos/nft/v1beta1/query.ts b/src/protobuf/cosmos/nft/v1beta1/query.ts deleted file mode 100644 index b930240a..00000000 --- a/src/protobuf/cosmos/nft/v1beta1/query.ts +++ /dev/null @@ -1,1138 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 -// source: cosmos/nft/v1beta1/query.proto - -/* eslint-disable */ -import Long from "long"; -import * as _m0 from "protobufjs/minimal"; -import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination"; -import { Class, NFT } from "./nft"; - -export const protobufPackage = "cosmos.nft.v1beta1"; - -/** QueryBalanceRequest is the request type for the Query/Balance RPC method */ -export interface QueryBalanceRequest { - /** class_id associated with the nft */ - class_id: string; - /** owner is the owner address of the nft */ - owner: string; -} - -/** QueryBalanceResponse is the response type for the Query/Balance RPC method */ -export interface QueryBalanceResponse { - /** amount is the number of all NFTs of a given class owned by the owner */ - amount: string; -} - -/** QueryOwnerRequest is the request type for the Query/Owner RPC method */ -export interface QueryOwnerRequest { - /** class_id associated with the nft */ - class_id: string; - /** id is a unique identifier of the NFT */ - id: string; -} - -/** QueryOwnerResponse is the response type for the Query/Owner RPC method */ -export interface QueryOwnerResponse { - /** owner is the owner address of the nft */ - owner: string; -} - -/** QuerySupplyRequest is the request type for the Query/Supply RPC method */ -export interface QuerySupplyRequest { - /** class_id associated with the nft */ - class_id: string; -} - -/** QuerySupplyResponse is the response type for the Query/Supply RPC method */ -export interface QuerySupplyResponse { - /** amount is the number of all NFTs from the given class */ - amount: string; -} - -/** QueryNFTstRequest is the request type for the Query/NFTs RPC method */ -export interface QueryNFTsRequest { - /** class_id associated with the nft */ - class_id: string; - /** owner is the owner address of the nft */ - owner: string; - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequest | undefined; -} - -/** QueryNFTsResponse is the response type for the Query/NFTs RPC methods */ -export interface QueryNFTsResponse { - /** NFT defines the NFT */ - nfts: NFT[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponse | undefined; -} - -/** QueryNFTRequest is the request type for the Query/NFT RPC method */ -export interface QueryNFTRequest { - /** class_id associated with the nft */ - class_id: string; - /** id is a unique identifier of the NFT */ - id: string; -} - -/** QueryNFTResponse is the response type for the Query/NFT RPC method */ -export interface QueryNFTResponse { - /** owner is the owner address of the nft */ - nft?: NFT | undefined; -} - -/** QueryClassRequest is the request type for the Query/Class RPC method */ -export interface QueryClassRequest { - /** class_id associated with the nft */ - class_id: string; -} - -/** QueryClassResponse is the response type for the Query/Class RPC method */ -export interface QueryClassResponse { - /** class defines the class of the nft type. */ - class?: Class | undefined; -} - -/** QueryClassesRequest is the request type for the Query/Classes RPC method */ -export interface QueryClassesRequest { - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequest | undefined; -} - -/** QueryClassesResponse is the response type for the Query/Classes RPC method */ -export interface QueryClassesResponse { - /** class defines the class of the nft type. */ - classes: Class[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponse | undefined; -} - -function createBaseQueryBalanceRequest(): QueryBalanceRequest { - return { class_id: "", owner: "" }; -} - -export const QueryBalanceRequest = { - encode(message: QueryBalanceRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.class_id !== "") { - writer.uint32(10).string(message.class_id); - } - if (message.owner !== "") { - writer.uint32(18).string(message.owner); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryBalanceRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryBalanceRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.class_id = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.owner = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryBalanceRequest { - return { - class_id: isSet(object.class_id) ? globalThis.String(object.class_id) : "", - owner: isSet(object.owner) ? globalThis.String(object.owner) : "", - }; - }, - - toJSON(message: QueryBalanceRequest): unknown { - const obj: any = {}; - if (message.class_id !== "") { - obj.class_id = message.class_id; - } - if (message.owner !== "") { - obj.owner = message.owner; - } - return obj; - }, - - create(base?: DeepPartial): QueryBalanceRequest { - return QueryBalanceRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryBalanceRequest { - const message = createBaseQueryBalanceRequest(); - message.class_id = object.class_id ?? ""; - message.owner = object.owner ?? ""; - return message; - }, -}; - -function createBaseQueryBalanceResponse(): QueryBalanceResponse { - return { amount: "0" }; -} - -export const QueryBalanceResponse = { - encode(message: QueryBalanceResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.amount !== "0") { - writer.uint32(8).uint64(message.amount); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryBalanceResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryBalanceResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.amount = longToString(reader.uint64() as Long); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryBalanceResponse { - return { amount: isSet(object.amount) ? globalThis.String(object.amount) : "0" }; - }, - - toJSON(message: QueryBalanceResponse): unknown { - const obj: any = {}; - if (message.amount !== "0") { - obj.amount = message.amount; - } - return obj; - }, - - create(base?: DeepPartial): QueryBalanceResponse { - return QueryBalanceResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryBalanceResponse { - const message = createBaseQueryBalanceResponse(); - message.amount = object.amount ?? "0"; - return message; - }, -}; - -function createBaseQueryOwnerRequest(): QueryOwnerRequest { - return { class_id: "", id: "" }; -} - -export const QueryOwnerRequest = { - encode(message: QueryOwnerRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.class_id !== "") { - writer.uint32(10).string(message.class_id); - } - if (message.id !== "") { - writer.uint32(18).string(message.id); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryOwnerRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryOwnerRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.class_id = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.id = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryOwnerRequest { - return { - class_id: isSet(object.class_id) ? globalThis.String(object.class_id) : "", - id: isSet(object.id) ? globalThis.String(object.id) : "", - }; - }, - - toJSON(message: QueryOwnerRequest): unknown { - const obj: any = {}; - if (message.class_id !== "") { - obj.class_id = message.class_id; - } - if (message.id !== "") { - obj.id = message.id; - } - return obj; - }, - - create(base?: DeepPartial): QueryOwnerRequest { - return QueryOwnerRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryOwnerRequest { - const message = createBaseQueryOwnerRequest(); - message.class_id = object.class_id ?? ""; - message.id = object.id ?? ""; - return message; - }, -}; - -function createBaseQueryOwnerResponse(): QueryOwnerResponse { - return { owner: "" }; -} - -export const QueryOwnerResponse = { - encode(message: QueryOwnerResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.owner !== "") { - writer.uint32(10).string(message.owner); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryOwnerResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryOwnerResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.owner = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryOwnerResponse { - return { owner: isSet(object.owner) ? globalThis.String(object.owner) : "" }; - }, - - toJSON(message: QueryOwnerResponse): unknown { - const obj: any = {}; - if (message.owner !== "") { - obj.owner = message.owner; - } - return obj; - }, - - create(base?: DeepPartial): QueryOwnerResponse { - return QueryOwnerResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryOwnerResponse { - const message = createBaseQueryOwnerResponse(); - message.owner = object.owner ?? ""; - return message; - }, -}; - -function createBaseQuerySupplyRequest(): QuerySupplyRequest { - return { class_id: "" }; -} - -export const QuerySupplyRequest = { - encode(message: QuerySupplyRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.class_id !== "") { - writer.uint32(10).string(message.class_id); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QuerySupplyRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQuerySupplyRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.class_id = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QuerySupplyRequest { - return { class_id: isSet(object.class_id) ? globalThis.String(object.class_id) : "" }; - }, - - toJSON(message: QuerySupplyRequest): unknown { - const obj: any = {}; - if (message.class_id !== "") { - obj.class_id = message.class_id; - } - return obj; - }, - - create(base?: DeepPartial): QuerySupplyRequest { - return QuerySupplyRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QuerySupplyRequest { - const message = createBaseQuerySupplyRequest(); - message.class_id = object.class_id ?? ""; - return message; - }, -}; - -function createBaseQuerySupplyResponse(): QuerySupplyResponse { - return { amount: "0" }; -} - -export const QuerySupplyResponse = { - encode(message: QuerySupplyResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.amount !== "0") { - writer.uint32(8).uint64(message.amount); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QuerySupplyResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQuerySupplyResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.amount = longToString(reader.uint64() as Long); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QuerySupplyResponse { - return { amount: isSet(object.amount) ? globalThis.String(object.amount) : "0" }; - }, - - toJSON(message: QuerySupplyResponse): unknown { - const obj: any = {}; - if (message.amount !== "0") { - obj.amount = message.amount; - } - return obj; - }, - - create(base?: DeepPartial): QuerySupplyResponse { - return QuerySupplyResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QuerySupplyResponse { - const message = createBaseQuerySupplyResponse(); - message.amount = object.amount ?? "0"; - return message; - }, -}; - -function createBaseQueryNFTsRequest(): QueryNFTsRequest { - return { class_id: "", owner: "", pagination: undefined }; -} - -export const QueryNFTsRequest = { - encode(message: QueryNFTsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.class_id !== "") { - writer.uint32(10).string(message.class_id); - } - if (message.owner !== "") { - writer.uint32(18).string(message.owner); - } - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryNFTsRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryNFTsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.class_id = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.owner = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.pagination = PageRequest.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryNFTsRequest { - return { - class_id: isSet(object.class_id) ? globalThis.String(object.class_id) : "", - owner: isSet(object.owner) ? globalThis.String(object.owner) : "", - pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, - }; - }, - - toJSON(message: QueryNFTsRequest): unknown { - const obj: any = {}; - if (message.class_id !== "") { - obj.class_id = message.class_id; - } - if (message.owner !== "") { - obj.owner = message.owner; - } - if (message.pagination !== undefined) { - obj.pagination = PageRequest.toJSON(message.pagination); - } - return obj; - }, - - create(base?: DeepPartial): QueryNFTsRequest { - return QueryNFTsRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryNFTsRequest { - const message = createBaseQueryNFTsRequest(); - message.class_id = object.class_id ?? ""; - message.owner = object.owner ?? ""; - message.pagination = (object.pagination !== undefined && object.pagination !== null) - ? PageRequest.fromPartial(object.pagination) - : undefined; - return message; - }, -}; - -function createBaseQueryNFTsResponse(): QueryNFTsResponse { - return { nfts: [], pagination: undefined }; -} - -export const QueryNFTsResponse = { - encode(message: QueryNFTsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.nfts) { - NFT.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryNFTsResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryNFTsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.nfts.push(NFT.decode(reader, reader.uint32())); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.pagination = PageResponse.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryNFTsResponse { - return { - nfts: globalThis.Array.isArray(object?.nfts) ? object.nfts.map((e: any) => NFT.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, - }; - }, - - toJSON(message: QueryNFTsResponse): unknown { - const obj: any = {}; - if (message.nfts?.length) { - obj.nfts = message.nfts.map((e) => NFT.toJSON(e)); - } - if (message.pagination !== undefined) { - obj.pagination = PageResponse.toJSON(message.pagination); - } - return obj; - }, - - create(base?: DeepPartial): QueryNFTsResponse { - return QueryNFTsResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryNFTsResponse { - const message = createBaseQueryNFTsResponse(); - message.nfts = object.nfts?.map((e) => NFT.fromPartial(e)) || []; - message.pagination = (object.pagination !== undefined && object.pagination !== null) - ? PageResponse.fromPartial(object.pagination) - : undefined; - return message; - }, -}; - -function createBaseQueryNFTRequest(): QueryNFTRequest { - return { class_id: "", id: "" }; -} - -export const QueryNFTRequest = { - encode(message: QueryNFTRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.class_id !== "") { - writer.uint32(10).string(message.class_id); - } - if (message.id !== "") { - writer.uint32(18).string(message.id); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryNFTRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryNFTRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.class_id = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.id = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryNFTRequest { - return { - class_id: isSet(object.class_id) ? globalThis.String(object.class_id) : "", - id: isSet(object.id) ? globalThis.String(object.id) : "", - }; - }, - - toJSON(message: QueryNFTRequest): unknown { - const obj: any = {}; - if (message.class_id !== "") { - obj.class_id = message.class_id; - } - if (message.id !== "") { - obj.id = message.id; - } - return obj; - }, - - create(base?: DeepPartial): QueryNFTRequest { - return QueryNFTRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryNFTRequest { - const message = createBaseQueryNFTRequest(); - message.class_id = object.class_id ?? ""; - message.id = object.id ?? ""; - return message; - }, -}; - -function createBaseQueryNFTResponse(): QueryNFTResponse { - return { nft: undefined }; -} - -export const QueryNFTResponse = { - encode(message: QueryNFTResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.nft !== undefined) { - NFT.encode(message.nft, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryNFTResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryNFTResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.nft = NFT.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryNFTResponse { - return { nft: isSet(object.nft) ? NFT.fromJSON(object.nft) : undefined }; - }, - - toJSON(message: QueryNFTResponse): unknown { - const obj: any = {}; - if (message.nft !== undefined) { - obj.nft = NFT.toJSON(message.nft); - } - return obj; - }, - - create(base?: DeepPartial): QueryNFTResponse { - return QueryNFTResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryNFTResponse { - const message = createBaseQueryNFTResponse(); - message.nft = (object.nft !== undefined && object.nft !== null) ? NFT.fromPartial(object.nft) : undefined; - return message; - }, -}; - -function createBaseQueryClassRequest(): QueryClassRequest { - return { class_id: "" }; -} - -export const QueryClassRequest = { - encode(message: QueryClassRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.class_id !== "") { - writer.uint32(10).string(message.class_id); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryClassRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryClassRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.class_id = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryClassRequest { - return { class_id: isSet(object.class_id) ? globalThis.String(object.class_id) : "" }; - }, - - toJSON(message: QueryClassRequest): unknown { - const obj: any = {}; - if (message.class_id !== "") { - obj.class_id = message.class_id; - } - return obj; - }, - - create(base?: DeepPartial): QueryClassRequest { - return QueryClassRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryClassRequest { - const message = createBaseQueryClassRequest(); - message.class_id = object.class_id ?? ""; - return message; - }, -}; - -function createBaseQueryClassResponse(): QueryClassResponse { - return { class: undefined }; -} - -export const QueryClassResponse = { - encode(message: QueryClassResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.class !== undefined) { - Class.encode(message.class, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryClassResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryClassResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.class = Class.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryClassResponse { - return { class: isSet(object.class) ? Class.fromJSON(object.class) : undefined }; - }, - - toJSON(message: QueryClassResponse): unknown { - const obj: any = {}; - if (message.class !== undefined) { - obj.class = Class.toJSON(message.class); - } - return obj; - }, - - create(base?: DeepPartial): QueryClassResponse { - return QueryClassResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryClassResponse { - const message = createBaseQueryClassResponse(); - message.class = (object.class !== undefined && object.class !== null) ? Class.fromPartial(object.class) : undefined; - return message; - }, -}; - -function createBaseQueryClassesRequest(): QueryClassesRequest { - return { pagination: undefined }; -} - -export const QueryClassesRequest = { - encode(message: QueryClassesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryClassesRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryClassesRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.pagination = PageRequest.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryClassesRequest { - return { pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; - }, - - toJSON(message: QueryClassesRequest): unknown { - const obj: any = {}; - if (message.pagination !== undefined) { - obj.pagination = PageRequest.toJSON(message.pagination); - } - return obj; - }, - - create(base?: DeepPartial): QueryClassesRequest { - return QueryClassesRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryClassesRequest { - const message = createBaseQueryClassesRequest(); - message.pagination = (object.pagination !== undefined && object.pagination !== null) - ? PageRequest.fromPartial(object.pagination) - : undefined; - return message; - }, -}; - -function createBaseQueryClassesResponse(): QueryClassesResponse { - return { classes: [], pagination: undefined }; -} - -export const QueryClassesResponse = { - encode(message: QueryClassesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.classes) { - Class.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryClassesResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryClassesResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.classes.push(Class.decode(reader, reader.uint32())); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.pagination = PageResponse.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryClassesResponse { - return { - classes: globalThis.Array.isArray(object?.classes) ? object.classes.map((e: any) => Class.fromJSON(e)) : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, - }; - }, - - toJSON(message: QueryClassesResponse): unknown { - const obj: any = {}; - if (message.classes?.length) { - obj.classes = message.classes.map((e) => Class.toJSON(e)); - } - if (message.pagination !== undefined) { - obj.pagination = PageResponse.toJSON(message.pagination); - } - return obj; - }, - - create(base?: DeepPartial): QueryClassesResponse { - return QueryClassesResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryClassesResponse { - const message = createBaseQueryClassesResponse(); - message.classes = object.classes?.map((e) => Class.fromPartial(e)) || []; - message.pagination = (object.pagination !== undefined && object.pagination !== null) - ? PageResponse.fromPartial(object.pagination) - : undefined; - return message; - }, -}; - -/** Query defines the gRPC querier service. */ -export interface Query { - /** Balance queries the number of NFTs of a given class owned by the owner, same as balanceOf in ERC721 */ - Balance(request: QueryBalanceRequest): Promise; - /** Owner queries the owner of the NFT based on its class and id, same as ownerOf in ERC721 */ - Owner(request: QueryOwnerRequest): Promise; - /** Supply queries the number of NFTs from the given class, same as totalSupply of ERC721. */ - Supply(request: QuerySupplyRequest): Promise; - /** - * NFTs queries all NFTs of a given class or owner,choose at least one of the two, similar to tokenByIndex in - * ERC721Enumerable - */ - NFTs(request: QueryNFTsRequest): Promise; - /** NFT queries an NFT based on its class and id. */ - NFT(request: QueryNFTRequest): Promise; - /** Class queries an NFT class based on its id */ - Class(request: QueryClassRequest): Promise; - /** Classes queries all NFT classes */ - Classes(request: QueryClassesRequest): Promise; -} - -export const QueryServiceName = "cosmos.nft.v1beta1.Query"; -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - private readonly service: string; - constructor(rpc: Rpc, opts?: { service?: string }) { - this.service = opts?.service || QueryServiceName; - this.rpc = rpc; - this.Balance = this.Balance.bind(this); - this.Owner = this.Owner.bind(this); - this.Supply = this.Supply.bind(this); - this.NFTs = this.NFTs.bind(this); - this.NFT = this.NFT.bind(this); - this.Class = this.Class.bind(this); - this.Classes = this.Classes.bind(this); - } - Balance(request: QueryBalanceRequest): Promise { - const data = QueryBalanceRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, "Balance", data); - return promise.then((data) => QueryBalanceResponse.decode(_m0.Reader.create(data))); - } - - Owner(request: QueryOwnerRequest): Promise { - const data = QueryOwnerRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, "Owner", data); - return promise.then((data) => QueryOwnerResponse.decode(_m0.Reader.create(data))); - } - - Supply(request: QuerySupplyRequest): Promise { - const data = QuerySupplyRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, "Supply", data); - return promise.then((data) => QuerySupplyResponse.decode(_m0.Reader.create(data))); - } - - NFTs(request: QueryNFTsRequest): Promise { - const data = QueryNFTsRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, "NFTs", data); - return promise.then((data) => QueryNFTsResponse.decode(_m0.Reader.create(data))); - } - - NFT(request: QueryNFTRequest): Promise { - const data = QueryNFTRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, "NFT", data); - return promise.then((data) => QueryNFTResponse.decode(_m0.Reader.create(data))); - } - - Class(request: QueryClassRequest): Promise { - const data = QueryClassRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, "Class", data); - return promise.then((data) => QueryClassResponse.decode(_m0.Reader.create(data))); - } - - Classes(request: QueryClassesRequest): Promise { - const data = QueryClassesRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, "Classes", data); - return promise.then((data) => QueryClassesResponse.decode(_m0.Reader.create(data))); - } -} - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin ? T - : T extends globalThis.Array ? globalThis.Array> - : T extends ReadonlyArray ? ReadonlyArray> - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/protobuf/cosmos/nft/v1beta1/tx.ts b/src/protobuf/cosmos/nft/v1beta1/tx.ts deleted file mode 100644 index 614d4cf8..00000000 --- a/src/protobuf/cosmos/nft/v1beta1/tx.ts +++ /dev/null @@ -1,211 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 -// source: cosmos/nft/v1beta1/tx.proto - -/* eslint-disable */ -import * as _m0 from "protobufjs/minimal"; - -export const protobufPackage = "cosmos.nft.v1beta1"; - -/** MsgSend represents a message to send a nft from one account to another account. */ -export interface MsgSend { - /** class_id defines the unique identifier of the nft classification, similar to the contract address of ERC721 */ - class_id: string; - /** id defines the unique identification of nft */ - id: string; - /** sender is the address of the owner of nft */ - sender: string; - /** receiver is the receiver address of nft */ - receiver: string; -} - -/** MsgSendResponse defines the Msg/Send response type. */ -export interface MsgSendResponse { -} - -function createBaseMsgSend(): MsgSend { - return { class_id: "", id: "", sender: "", receiver: "" }; -} - -export const MsgSend = { - encode(message: MsgSend, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.class_id !== "") { - writer.uint32(10).string(message.class_id); - } - if (message.id !== "") { - writer.uint32(18).string(message.id); - } - if (message.sender !== "") { - writer.uint32(26).string(message.sender); - } - if (message.receiver !== "") { - writer.uint32(34).string(message.receiver); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgSend { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgSend(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.class_id = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.id = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.sender = reader.string(); - continue; - case 4: - if (tag !== 34) { - break; - } - - message.receiver = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): MsgSend { - return { - class_id: isSet(object.class_id) ? globalThis.String(object.class_id) : "", - id: isSet(object.id) ? globalThis.String(object.id) : "", - sender: isSet(object.sender) ? globalThis.String(object.sender) : "", - receiver: isSet(object.receiver) ? globalThis.String(object.receiver) : "", - }; - }, - - toJSON(message: MsgSend): unknown { - const obj: any = {}; - if (message.class_id !== "") { - obj.class_id = message.class_id; - } - if (message.id !== "") { - obj.id = message.id; - } - if (message.sender !== "") { - obj.sender = message.sender; - } - if (message.receiver !== "") { - obj.receiver = message.receiver; - } - return obj; - }, - - create(base?: DeepPartial): MsgSend { - return MsgSend.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): MsgSend { - const message = createBaseMsgSend(); - message.class_id = object.class_id ?? ""; - message.id = object.id ?? ""; - message.sender = object.sender ?? ""; - message.receiver = object.receiver ?? ""; - return message; - }, -}; - -function createBaseMsgSendResponse(): MsgSendResponse { - return {}; -} - -export const MsgSendResponse = { - encode(_: MsgSendResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgSendResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgSendResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(_: any): MsgSendResponse { - return {}; - }, - - toJSON(_: MsgSendResponse): unknown { - const obj: any = {}; - return obj; - }, - - create(base?: DeepPartial): MsgSendResponse { - return MsgSendResponse.fromPartial(base ?? {}); - }, - fromPartial(_: DeepPartial): MsgSendResponse { - const message = createBaseMsgSendResponse(); - return message; - }, -}; - -/** Msg defines the nft Msg service. */ -export interface Msg { - /** Send defines a method to send a nft from one account to another account. */ - Send(request: MsgSend): Promise; -} - -export const MsgServiceName = "cosmos.nft.v1beta1.Msg"; -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - private readonly service: string; - constructor(rpc: Rpc, opts?: { service?: string }) { - this.service = opts?.service || MsgServiceName; - this.rpc = rpc; - this.Send = this.Send.bind(this); - } - Send(request: MsgSend): Promise { - const data = MsgSend.encode(request).finish(); - const promise = this.rpc.request(this.service, "Send", data); - return promise.then((data) => MsgSendResponse.decode(_m0.Reader.create(data))); - } -} - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin ? T - : T extends globalThis.Array ? globalThis.Array> - : T extends ReadonlyArray ? ReadonlyArray> - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/protobuf/cosmos/orm/module/v1alpha1/module.ts b/src/protobuf/cosmos/orm/module/v1alpha1/module.ts index c6d4e46b..66a4e77e 100644 --- a/src/protobuf/cosmos/orm/module/v1alpha1/module.ts +++ b/src/protobuf/cosmos/orm/module/v1alpha1/module.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/orm/module/v1alpha1/module.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/orm/query/v1alpha1/query.ts b/src/protobuf/cosmos/orm/query/v1alpha1/query.ts index c4deaad5..ded1e862 100644 --- a/src/protobuf/cosmos/orm/query/v1alpha1/query.ts +++ b/src/protobuf/cosmos/orm/query/v1alpha1/query.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/orm/query/v1alpha1/query.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/orm/v1/orm.ts b/src/protobuf/cosmos/orm/v1/orm.ts index 5a7b1ed7..5707a513 100644 --- a/src/protobuf/cosmos/orm/v1/orm.ts +++ b/src/protobuf/cosmos/orm/v1/orm.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/orm/v1/orm.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/orm/v1alpha1/schema.ts b/src/protobuf/cosmos/orm/v1alpha1/schema.ts index 0d87ed1d..22d00092 100644 --- a/src/protobuf/cosmos/orm/v1alpha1/schema.ts +++ b/src/protobuf/cosmos/orm/v1alpha1/schema.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/orm/v1alpha1/schema.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/params/module/v1/module.ts b/src/protobuf/cosmos/params/module/v1/module.ts index 999674da..573d0065 100644 --- a/src/protobuf/cosmos/params/module/v1/module.ts +++ b/src/protobuf/cosmos/params/module/v1/module.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/params/module/v1/module.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/params/v1beta1/params.ts b/src/protobuf/cosmos/params/v1beta1/params.ts index f3e3d8ca..99c772ac 100644 --- a/src/protobuf/cosmos/params/v1beta1/params.ts +++ b/src/protobuf/cosmos/params/v1beta1/params.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/params/v1beta1/params.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/params/v1beta1/query.ts b/src/protobuf/cosmos/params/v1beta1/query.ts index e8101800..c4ef0adf 100644 --- a/src/protobuf/cosmos/params/v1beta1/query.ts +++ b/src/protobuf/cosmos/params/v1beta1/query.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/params/v1beta1/query.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/query/v1/query.ts b/src/protobuf/cosmos/query/v1/query.ts index ee0f702e..a0e4110d 100644 --- a/src/protobuf/cosmos/query/v1/query.ts +++ b/src/protobuf/cosmos/query/v1/query.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/query/v1/query.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/reflection/v1/reflection.ts b/src/protobuf/cosmos/reflection/v1/reflection.ts index 6d366ce4..dac06c89 100644 --- a/src/protobuf/cosmos/reflection/v1/reflection.ts +++ b/src/protobuf/cosmos/reflection/v1/reflection.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/reflection/v1/reflection.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/slashing/module/v1/module.ts b/src/protobuf/cosmos/slashing/module/v1/module.ts index 4afbb64c..136319e5 100644 --- a/src/protobuf/cosmos/slashing/module/v1/module.ts +++ b/src/protobuf/cosmos/slashing/module/v1/module.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/slashing/module/v1/module.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/slashing/v1beta1/genesis.ts b/src/protobuf/cosmos/slashing/v1beta1/genesis.ts index e89222a3..bfb0675a 100644 --- a/src/protobuf/cosmos/slashing/v1beta1/genesis.ts +++ b/src/protobuf/cosmos/slashing/v1beta1/genesis.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/slashing/v1beta1/genesis.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/slashing/v1beta1/query.ts b/src/protobuf/cosmos/slashing/v1beta1/query.ts index cae990fa..af3626a8 100644 --- a/src/protobuf/cosmos/slashing/v1beta1/query.ts +++ b/src/protobuf/cosmos/slashing/v1beta1/query.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/slashing/v1beta1/query.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/slashing/v1beta1/slashing.ts b/src/protobuf/cosmos/slashing/v1beta1/slashing.ts index a3ca7041..5bc82408 100644 --- a/src/protobuf/cosmos/slashing/v1beta1/slashing.ts +++ b/src/protobuf/cosmos/slashing/v1beta1/slashing.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/slashing/v1beta1/slashing.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/slashing/v1beta1/tx.ts b/src/protobuf/cosmos/slashing/v1beta1/tx.ts index 2f822813..0eb75e9d 100644 --- a/src/protobuf/cosmos/slashing/v1beta1/tx.ts +++ b/src/protobuf/cosmos/slashing/v1beta1/tx.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/slashing/v1beta1/tx.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/staking/module/v1/module.ts b/src/protobuf/cosmos/staking/module/v1/module.ts index 2d7e27d9..c1c2d006 100644 --- a/src/protobuf/cosmos/staking/module/v1/module.ts +++ b/src/protobuf/cosmos/staking/module/v1/module.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/staking/module/v1/module.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/staking/v1beta1/authz.ts b/src/protobuf/cosmos/staking/v1beta1/authz.ts index 3fc466db..aecd01ff 100644 --- a/src/protobuf/cosmos/staking/v1beta1/authz.ts +++ b/src/protobuf/cosmos/staking/v1beta1/authz.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/staking/v1beta1/authz.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/staking/v1beta1/genesis.ts b/src/protobuf/cosmos/staking/v1beta1/genesis.ts index d48ad8ec..0906859d 100644 --- a/src/protobuf/cosmos/staking/v1beta1/genesis.ts +++ b/src/protobuf/cosmos/staking/v1beta1/genesis.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/staking/v1beta1/genesis.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/staking/v1beta1/query.ts b/src/protobuf/cosmos/staking/v1beta1/query.ts index dbe1c41a..8c238179 100644 --- a/src/protobuf/cosmos/staking/v1beta1/query.ts +++ b/src/protobuf/cosmos/staking/v1beta1/query.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/staking/v1beta1/query.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/staking/v1beta1/staking.ts b/src/protobuf/cosmos/staking/v1beta1/staking.ts index 1dad9132..eaf64510 100644 --- a/src/protobuf/cosmos/staking/v1beta1/staking.ts +++ b/src/protobuf/cosmos/staking/v1beta1/staking.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/staking/v1beta1/staking.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/staking/v1beta1/tx.ts b/src/protobuf/cosmos/staking/v1beta1/tx.ts index 446893a7..f872bd92 100644 --- a/src/protobuf/cosmos/staking/v1beta1/tx.ts +++ b/src/protobuf/cosmos/staking/v1beta1/tx.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/staking/v1beta1/tx.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/store/internal/kv/v1beta1/kv.ts b/src/protobuf/cosmos/store/internal/kv/v1beta1/kv.ts index 720f9592..17484dd2 100644 --- a/src/protobuf/cosmos/store/internal/kv/v1beta1/kv.ts +++ b/src/protobuf/cosmos/store/internal/kv/v1beta1/kv.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/store/internal/kv/v1beta1/kv.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/store/snapshots/v1/snapshot.ts b/src/protobuf/cosmos/store/snapshots/v1/snapshot.ts index 54097c88..e3ee8991 100644 --- a/src/protobuf/cosmos/store/snapshots/v1/snapshot.ts +++ b/src/protobuf/cosmos/store/snapshots/v1/snapshot.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/store/snapshots/v1/snapshot.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/store/streaming/abci/grpc.ts b/src/protobuf/cosmos/store/streaming/abci/grpc.ts index 237b245f..463fe73c 100644 --- a/src/protobuf/cosmos/store/streaming/abci/grpc.ts +++ b/src/protobuf/cosmos/store/streaming/abci/grpc.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/store/streaming/abci/grpc.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/store/v1beta1/commit_info.ts b/src/protobuf/cosmos/store/v1beta1/commit_info.ts index e0bf86d4..b01bf66a 100644 --- a/src/protobuf/cosmos/store/v1beta1/commit_info.ts +++ b/src/protobuf/cosmos/store/v1beta1/commit_info.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/store/v1beta1/commit_info.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/store/v1beta1/listening.ts b/src/protobuf/cosmos/store/v1beta1/listening.ts index 4a9b9a8a..2d038c3d 100644 --- a/src/protobuf/cosmos/store/v1beta1/listening.ts +++ b/src/protobuf/cosmos/store/v1beta1/listening.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/store/v1beta1/listening.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/tx/config/v1/config.ts b/src/protobuf/cosmos/tx/config/v1/config.ts index bd465997..78c9ab5e 100644 --- a/src/protobuf/cosmos/tx/config/v1/config.ts +++ b/src/protobuf/cosmos/tx/config/v1/config.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/tx/config/v1/config.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/tx/signing/v1beta1/signing.ts b/src/protobuf/cosmos/tx/signing/v1beta1/signing.ts index 4e2f497b..2390627b 100644 --- a/src/protobuf/cosmos/tx/signing/v1beta1/signing.ts +++ b/src/protobuf/cosmos/tx/signing/v1beta1/signing.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/tx/signing/v1beta1/signing.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/tx/v1beta1/service.ts b/src/protobuf/cosmos/tx/v1beta1/service.ts index a5016790..6d151bd7 100644 --- a/src/protobuf/cosmos/tx/v1beta1/service.ts +++ b/src/protobuf/cosmos/tx/v1beta1/service.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/tx/v1beta1/service.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/tx/v1beta1/tx.ts b/src/protobuf/cosmos/tx/v1beta1/tx.ts index 06fbbc96..73c33d44 100644 --- a/src/protobuf/cosmos/tx/v1beta1/tx.ts +++ b/src/protobuf/cosmos/tx/v1beta1/tx.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/tx/v1beta1/tx.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/upgrade/module/v1/module.ts b/src/protobuf/cosmos/upgrade/module/v1/module.ts index a899ddae..6ba69a23 100644 --- a/src/protobuf/cosmos/upgrade/module/v1/module.ts +++ b/src/protobuf/cosmos/upgrade/module/v1/module.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/upgrade/module/v1/module.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/upgrade/v1beta1/query.ts b/src/protobuf/cosmos/upgrade/v1beta1/query.ts index 43ef9489..ce1c24e6 100644 --- a/src/protobuf/cosmos/upgrade/v1beta1/query.ts +++ b/src/protobuf/cosmos/upgrade/v1beta1/query.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/upgrade/v1beta1/query.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/upgrade/v1beta1/tx.ts b/src/protobuf/cosmos/upgrade/v1beta1/tx.ts index 10c04f0b..9ab54844 100644 --- a/src/protobuf/cosmos/upgrade/v1beta1/tx.ts +++ b/src/protobuf/cosmos/upgrade/v1beta1/tx.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/upgrade/v1beta1/tx.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/upgrade/v1beta1/upgrade.ts b/src/protobuf/cosmos/upgrade/v1beta1/upgrade.ts index 19a378c8..2c920007 100644 --- a/src/protobuf/cosmos/upgrade/v1beta1/upgrade.ts +++ b/src/protobuf/cosmos/upgrade/v1beta1/upgrade.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/upgrade/v1beta1/upgrade.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/vesting/module/v1/module.ts b/src/protobuf/cosmos/vesting/module/v1/module.ts index c757497a..47164c3f 100644 --- a/src/protobuf/cosmos/vesting/module/v1/module.ts +++ b/src/protobuf/cosmos/vesting/module/v1/module.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/vesting/module/v1/module.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/vesting/v1beta1/tx.ts b/src/protobuf/cosmos/vesting/v1beta1/tx.ts index 14b7fe01..9b1efd9a 100644 --- a/src/protobuf/cosmos/vesting/v1beta1/tx.ts +++ b/src/protobuf/cosmos/vesting/v1beta1/tx.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/vesting/v1beta1/tx.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos/vesting/v1beta1/vesting.ts b/src/protobuf/cosmos/vesting/v1beta1/vesting.ts index b197fb53..5cc0018e 100644 --- a/src/protobuf/cosmos/vesting/v1beta1/vesting.ts +++ b/src/protobuf/cosmos/vesting/v1beta1/vesting.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos/vesting/v1beta1/vesting.proto /* eslint-disable */ diff --git a/src/protobuf/cosmos_proto/cosmos.ts b/src/protobuf/cosmos_proto/cosmos.ts index ecfa04fe..f0a12ad3 100644 --- a/src/protobuf/cosmos_proto/cosmos.ts +++ b/src/protobuf/cosmos_proto/cosmos.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: cosmos_proto/cosmos.proto /* eslint-disable */ diff --git a/src/protobuf/gogoproto/gogo.ts b/src/protobuf/gogoproto/gogo.ts index 0f83ed97..3721ef4e 100644 --- a/src/protobuf/gogoproto/gogo.ts +++ b/src/protobuf/gogoproto/gogo.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: gogoproto/gogo.proto /* eslint-disable */ diff --git a/src/protobuf/google/api/annotations.ts b/src/protobuf/google/api/annotations.ts index 772cc2fe..e565d7d5 100644 --- a/src/protobuf/google/api/annotations.ts +++ b/src/protobuf/google/api/annotations.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: google/api/annotations.proto /* eslint-disable */ diff --git a/src/protobuf/google/api/http.ts b/src/protobuf/google/api/http.ts index 0f62a5cd..88b5a897 100644 --- a/src/protobuf/google/api/http.ts +++ b/src/protobuf/google/api/http.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: google/api/http.proto /* eslint-disable */ diff --git a/src/protobuf/google/api/httpbody.ts b/src/protobuf/google/api/httpbody.ts index d0e86b62..2e8a1217 100644 --- a/src/protobuf/google/api/httpbody.ts +++ b/src/protobuf/google/api/httpbody.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: google/api/httpbody.proto /* eslint-disable */ diff --git a/src/protobuf/google/protobuf/any.ts b/src/protobuf/google/protobuf/any.ts index a9774696..ccea7d69 100644 --- a/src/protobuf/google/protobuf/any.ts +++ b/src/protobuf/google/protobuf/any.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: google/protobuf/any.proto /* eslint-disable */ diff --git a/src/protobuf/google/protobuf/descriptor.ts b/src/protobuf/google/protobuf/descriptor.ts index e339608f..2afe18a6 100644 --- a/src/protobuf/google/protobuf/descriptor.ts +++ b/src/protobuf/google/protobuf/descriptor.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: google/protobuf/descriptor.proto /* eslint-disable */ @@ -10,125 +10,6 @@ import * as _m0 from "protobufjs/minimal"; export const protobufPackage = "google.protobuf"; -/** The full set of known editions. */ -export enum Edition { - /** EDITION_UNKNOWN - A placeholder for an unknown edition value. */ - EDITION_UNKNOWN = 0, - /** - * EDITION_LEGACY - A placeholder edition for specifying default behaviors *before* a feature - * was first introduced. This is effectively an "infinite past". - */ - EDITION_LEGACY = 900, - /** - * EDITION_PROTO2 - Legacy syntax "editions". These pre-date editions, but behave much like - * distinct editions. These can't be used to specify the edition of proto - * files, but feature definitions must supply proto2/proto3 defaults for - * backwards compatibility. - */ - EDITION_PROTO2 = 998, - EDITION_PROTO3 = 999, - /** - * EDITION_2023 - Editions that have been released. The specific values are arbitrary and - * should not be depended on, but they will always be time-ordered for easy - * comparison. - */ - EDITION_2023 = 1000, - EDITION_2024 = 1001, - /** - * EDITION_1_TEST_ONLY - Placeholder editions for testing feature resolution. These should not be - * used or relyed on outside of tests. - */ - EDITION_1_TEST_ONLY = 1, - EDITION_2_TEST_ONLY = 2, - EDITION_99997_TEST_ONLY = 99997, - EDITION_99998_TEST_ONLY = 99998, - EDITION_99999_TEST_ONLY = 99999, - /** - * EDITION_MAX - Placeholder for specifying unbounded edition support. This should only - * ever be used by plugins that can expect to never require any changes to - * support a new edition. - */ - EDITION_MAX = 2147483647, - UNRECOGNIZED = -1, -} - -export function editionFromJSON(object: any): Edition { - switch (object) { - case 0: - case "EDITION_UNKNOWN": - return Edition.EDITION_UNKNOWN; - case 900: - case "EDITION_LEGACY": - return Edition.EDITION_LEGACY; - case 998: - case "EDITION_PROTO2": - return Edition.EDITION_PROTO2; - case 999: - case "EDITION_PROTO3": - return Edition.EDITION_PROTO3; - case 1000: - case "EDITION_2023": - return Edition.EDITION_2023; - case 1001: - case "EDITION_2024": - return Edition.EDITION_2024; - case 1: - case "EDITION_1_TEST_ONLY": - return Edition.EDITION_1_TEST_ONLY; - case 2: - case "EDITION_2_TEST_ONLY": - return Edition.EDITION_2_TEST_ONLY; - case 99997: - case "EDITION_99997_TEST_ONLY": - return Edition.EDITION_99997_TEST_ONLY; - case 99998: - case "EDITION_99998_TEST_ONLY": - return Edition.EDITION_99998_TEST_ONLY; - case 99999: - case "EDITION_99999_TEST_ONLY": - return Edition.EDITION_99999_TEST_ONLY; - case 2147483647: - case "EDITION_MAX": - return Edition.EDITION_MAX; - case -1: - case "UNRECOGNIZED": - default: - return Edition.UNRECOGNIZED; - } -} - -export function editionToJSON(object: Edition): string { - switch (object) { - case Edition.EDITION_UNKNOWN: - return "EDITION_UNKNOWN"; - case Edition.EDITION_LEGACY: - return "EDITION_LEGACY"; - case Edition.EDITION_PROTO2: - return "EDITION_PROTO2"; - case Edition.EDITION_PROTO3: - return "EDITION_PROTO3"; - case Edition.EDITION_2023: - return "EDITION_2023"; - case Edition.EDITION_2024: - return "EDITION_2024"; - case Edition.EDITION_1_TEST_ONLY: - return "EDITION_1_TEST_ONLY"; - case Edition.EDITION_2_TEST_ONLY: - return "EDITION_2_TEST_ONLY"; - case Edition.EDITION_99997_TEST_ONLY: - return "EDITION_99997_TEST_ONLY"; - case Edition.EDITION_99998_TEST_ONLY: - return "EDITION_99998_TEST_ONLY"; - case Edition.EDITION_99999_TEST_ONLY: - return "EDITION_99999_TEST_ONLY"; - case Edition.EDITION_MAX: - return "EDITION_MAX"; - case Edition.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - /** * The protocol compiler can output a FileDescriptorSet containing the .proto * files it parses. @@ -175,15 +56,9 @@ export interface FileDescriptorProto { | undefined; /** * The syntax of the proto file. - * The supported values are "proto2", "proto3", and "editions". - * - * If `edition` is present, this value must be "editions". + * The supported values are "proto2" and "proto3". */ - syntax?: - | string - | undefined; - /** The edition of the proto file. */ - edition?: Edition | undefined; + syntax?: string | undefined; } /** Describes a message type. */ @@ -231,92 +106,6 @@ export interface DescriptorProto_ReservedRange { export interface ExtensionRangeOptions { /** The parser stores options it doesn't recognize here. See above. */ uninterpreted_option: UninterpretedOption[]; - /** - * For external users: DO NOT USE. We are in the process of open sourcing - * extension declaration and executing internal cleanups before it can be - * used externally. - */ - declaration: ExtensionRangeOptions_Declaration[]; - /** Any features defined in the specific edition. */ - features?: - | FeatureSet - | undefined; - /** - * The verification state of the range. - * TODO: flip the default to DECLARATION once all empty ranges - * are marked as UNVERIFIED. - */ - verification?: ExtensionRangeOptions_VerificationState | undefined; -} - -/** The verification state of the extension range. */ -export enum ExtensionRangeOptions_VerificationState { - /** DECLARATION - All the extensions of the range must be declared. */ - DECLARATION = 0, - UNVERIFIED = 1, - UNRECOGNIZED = -1, -} - -export function extensionRangeOptions_VerificationStateFromJSON(object: any): ExtensionRangeOptions_VerificationState { - switch (object) { - case 0: - case "DECLARATION": - return ExtensionRangeOptions_VerificationState.DECLARATION; - case 1: - case "UNVERIFIED": - return ExtensionRangeOptions_VerificationState.UNVERIFIED; - case -1: - case "UNRECOGNIZED": - default: - return ExtensionRangeOptions_VerificationState.UNRECOGNIZED; - } -} - -export function extensionRangeOptions_VerificationStateToJSON(object: ExtensionRangeOptions_VerificationState): string { - switch (object) { - case ExtensionRangeOptions_VerificationState.DECLARATION: - return "DECLARATION"; - case ExtensionRangeOptions_VerificationState.UNVERIFIED: - return "UNVERIFIED"; - case ExtensionRangeOptions_VerificationState.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export interface ExtensionRangeOptions_Declaration { - /** The extension number declared within the extension range. */ - number?: - | number - | undefined; - /** - * The fully-qualified name of the extension field. There must be a leading - * dot in front of the full name. - */ - full_name?: - | string - | undefined; - /** - * The fully-qualified type name of the extension field. Unlike - * Metadata.type, Declaration.type must have a leading dot for messages - * and enums. - */ - type?: - | string - | undefined; - /** - * If true, indicates that the number is reserved in the extension range, - * and any extension field with the number will fail to compile. Set this - * when a declared extension field is deleted. - */ - reserved?: - | boolean - | undefined; - /** - * If true, indicates that the extension must be defined as repeated. - * Otherwise the extension must be defined as optional. - */ - repeated?: boolean | undefined; } /** Describes a field within a message. */ @@ -380,12 +169,12 @@ export interface FieldDescriptorProto { * If true, this is a proto3 "optional". When a proto3 field is optional, it * tracks presence regardless of field type. * - * When proto3_optional is true, this field must belong to a oneof to signal - * to old proto3 clients that presence is tracked for this field. This oneof - * is known as a "synthetic" oneof, and this field must be its sole member - * (each proto3 optional field gets its own synthetic oneof). Synthetic oneofs - * exist in the descriptor only, and do not generate any API. Synthetic oneofs - * must be ordered after all "real" oneofs. + * When proto3_optional is true, this field must be belong to a oneof to + * signal to old proto3 clients that presence is tracked for this field. This + * oneof is known as a "synthetic" oneof, and this field must be its sole + * member (each proto3 optional field gets its own synthetic oneof). Synthetic + * oneofs exist in the descriptor only, and do not generate any API. Synthetic + * oneofs must be ordered after all "real" oneofs. * * For message fields, proto3_optional doesn't create any semantic change, * since non-repeated message fields always track presence. However it still @@ -426,10 +215,9 @@ export enum FieldDescriptorProto_Type { TYPE_STRING = 9, /** * TYPE_GROUP - Tag-delimited aggregate. - * Group type is deprecated and not supported after google.protobuf. However, Proto3 + * Group type is deprecated and not supported in proto3. However, Proto3 * implementations should still be able to parse the group wire format and - * treat group fields as unknown fields. In Editions, the group wire format - * can be enabled via the `message_encoding` feature. + * treat group fields as unknown fields. */ TYPE_GROUP = 10, /** TYPE_MESSAGE - Length-delimited aggregate. */ @@ -557,13 +345,8 @@ export function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Typ export enum FieldDescriptorProto_Label { /** LABEL_OPTIONAL - 0 is reserved for errors */ LABEL_OPTIONAL = 1, - LABEL_REPEATED = 3, - /** - * LABEL_REQUIRED - The required label is only allowed in google.protobuf. In proto3 and Editions - * it's explicitly prohibited. In Editions, the `field_presence` feature - * can be used to get this behavior. - */ LABEL_REQUIRED = 2, + LABEL_REPEATED = 3, UNRECOGNIZED = -1, } @@ -572,12 +355,12 @@ export function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptor case 1: case "LABEL_OPTIONAL": return FieldDescriptorProto_Label.LABEL_OPTIONAL; - case 3: - case "LABEL_REPEATED": - return FieldDescriptorProto_Label.LABEL_REPEATED; case 2: case "LABEL_REQUIRED": return FieldDescriptorProto_Label.LABEL_REQUIRED; + case 3: + case "LABEL_REPEATED": + return FieldDescriptorProto_Label.LABEL_REPEATED; case -1: case "UNRECOGNIZED": default: @@ -589,10 +372,10 @@ export function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_La switch (object) { case FieldDescriptorProto_Label.LABEL_OPTIONAL: return "LABEL_OPTIONAL"; - case FieldDescriptorProto_Label.LABEL_REPEATED: - return "LABEL_REPEATED"; case FieldDescriptorProto_Label.LABEL_REQUIRED: return "LABEL_REQUIRED"; + case FieldDescriptorProto_Label.LABEL_REPEATED: + return "LABEL_REPEATED"; case FieldDescriptorProto_Label.UNRECOGNIZED: default: return "UNRECOGNIZED"; @@ -718,16 +501,12 @@ export interface FileOptions { | boolean | undefined; /** - * A proto2 file can set this to true to opt in to UTF-8 checking for Java, - * which will throw an exception if invalid UTF-8 is parsed from the wire or - * assigned to a string field. - * - * TODO: clarify exactly what kinds of field types this option - * applies to, and update these docs accordingly. - * - * Proto3 files already perform these checks. Setting the option explicitly to - * false has no effect: it cannot be used to opt proto3 files out of UTF-8 - * checks. + * If set true, then the Java2 code generator will generate code that + * throws an exception whenever an attempt is made to assign a non-UTF-8 + * byte sequence to a string field. + * Message reflection will do the same. + * However, an extension field still accepts non-UTF-8 byte sequences. + * This option has no effect on when used with the lite runtime. */ java_string_check_utf8?: boolean | undefined; optimize_for?: @@ -757,7 +536,8 @@ export interface FileOptions { */ cc_generic_services?: boolean | undefined; java_generic_services?: boolean | undefined; - py_generic_services?: + py_generic_services?: boolean | undefined; + php_generic_services?: | boolean | undefined; /** @@ -827,10 +607,6 @@ export interface FileOptions { ruby_package?: | string | undefined; - /** Any features defined in the specific edition. */ - features?: - | FeatureSet - | undefined; /** * The parser stores options it doesn't recognize here. * See the documentation for the "Options" section above. @@ -948,40 +724,16 @@ export interface MessageOptions { map_entry?: | boolean | undefined; - /** - * Enable the legacy handling of JSON field name conflicts. This lowercases - * and strips underscored from the fields before comparison in proto3 only. - * The new behavior takes `json_name` into account and applies to proto2 as - * well. - * - * This should only be used as a temporary measure against broken builds due - * to the change in behavior for JSON field name conflicts. - * - * TODO This is legacy behavior we plan to remove once downstream - * teams have had time to migrate. - * - * @deprecated - */ - deprecated_legacy_json_field_conflicts?: - | boolean - | undefined; - /** Any features defined in the specific edition. */ - features?: - | FeatureSet - | undefined; /** The parser stores options it doesn't recognize here. See above. */ uninterpreted_option: UninterpretedOption[]; } export interface FieldOptions { /** - * NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead. * The ctype option instructs the C++ code generator to use a different * representation of the field than it normally would. See the specific - * options below. This option is only implemented to support use of - * [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of - * type "bytes" in the open source release. - * TODO: make ctype actually deprecated. + * options below. This option is not yet implemented in the open source + * release -- sorry, we'll try to include it in a future version! */ ctype?: | FieldOptions_CType @@ -991,9 +743,7 @@ export interface FieldOptions { * a more efficient representation on the wire. Rather than repeatedly * writing the tag and type for each element, the entire array is encoded as * a single length-delimited blob. In proto3, only explicit setting it to - * false will avoid using packed encoding. This option is prohibited in - * Editions, but the `repeated_field_encoding` feature can be used to control - * the behavior. + * false will avoid using packed encoding. */ packed?: | boolean @@ -1032,11 +782,22 @@ export interface FieldOptions { * call from multiple threads concurrently, while non-const methods continue * to require exclusive access. * - * Note that lazy message fields are still eagerly verified to check - * ill-formed wireformat or missing required fields. Calling IsInitialized() - * on the outer message would fail if the inner message has missing required - * fields. Failed verification would result in parsing failure (except when - * uninitialized messages are acceptable). + * Note that implementations may choose not to check required fields within + * a lazy sub-message. That is, calling IsInitialized() on the outer message + * may return true even if the inner message has missing required fields. + * This is necessary because otherwise the inner message would have to be + * parsed in order to perform the check, defeating the purpose of lazy + * parsing. An implementation which chooses not to check required fields + * must be consistent about it. That is, for any particular sub-message, the + * implementation must either *always* check its required fields, or *never* + * check its required fields, regardless of whether or not the message has + * been parsed. + * + * As of 2021, lazy does no correctness checks on the byte stream during + * parsing. This may lead to crashes if and when an invalid byte stream is + * finally parsed upon access. + * + * TODO(b/211906113): Enable validation on lazy fields. */ lazy?: | boolean @@ -1062,19 +823,6 @@ export interface FieldOptions { weak?: | boolean | undefined; - /** - * Indicate that the field value should not be printed out when using debug - * formats, e.g. when the field contains sensitive credentials. - */ - debug_redact?: boolean | undefined; - retention?: FieldOptions_OptionRetention | undefined; - targets: FieldOptions_OptionTargetType[]; - edition_defaults: FieldOptions_EditionDefault[]; - /** Any features defined in the specific edition. */ - features?: FeatureSet | undefined; - feature_support?: - | FieldOptions_FeatureSupport - | undefined; /** The parser stores options it doesn't recognize here. See above. */ uninterpreted_option: UninterpretedOption[]; } @@ -1082,14 +830,6 @@ export interface FieldOptions { export enum FieldOptions_CType { /** STRING - Default mode. */ STRING = 0, - /** - * CORD - The option [ctype=CORD] may be applied to a non-repeated field of type - * "bytes". It indicates that in C++, the data should be stored in a Cord - * instead of a string. For very large strings, this may reduce memory - * fragmentation. It may also allow better performance when parsing from a - * Cord, or when parsing with aliasing enabled, as the parsed Cord may then - * alias the original buffer. - */ CORD = 1, STRING_PIECE = 2, UNRECOGNIZED = -1, @@ -1169,182 +909,7 @@ export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { } } -/** - * If set to RETENTION_SOURCE, the option will be omitted from the binary. - * Note: as of January 2023, support for this is in progress and does not yet - * have an effect (b/264593489). - */ -export enum FieldOptions_OptionRetention { - RETENTION_UNKNOWN = 0, - RETENTION_RUNTIME = 1, - RETENTION_SOURCE = 2, - UNRECOGNIZED = -1, -} - -export function fieldOptions_OptionRetentionFromJSON(object: any): FieldOptions_OptionRetention { - switch (object) { - case 0: - case "RETENTION_UNKNOWN": - return FieldOptions_OptionRetention.RETENTION_UNKNOWN; - case 1: - case "RETENTION_RUNTIME": - return FieldOptions_OptionRetention.RETENTION_RUNTIME; - case 2: - case "RETENTION_SOURCE": - return FieldOptions_OptionRetention.RETENTION_SOURCE; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_OptionRetention.UNRECOGNIZED; - } -} - -export function fieldOptions_OptionRetentionToJSON(object: FieldOptions_OptionRetention): string { - switch (object) { - case FieldOptions_OptionRetention.RETENTION_UNKNOWN: - return "RETENTION_UNKNOWN"; - case FieldOptions_OptionRetention.RETENTION_RUNTIME: - return "RETENTION_RUNTIME"; - case FieldOptions_OptionRetention.RETENTION_SOURCE: - return "RETENTION_SOURCE"; - case FieldOptions_OptionRetention.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -/** - * This indicates the types of entities that the field may apply to when used - * as an option. If it is unset, then the field may be freely used as an - * option on any kind of entity. Note: as of January 2023, support for this is - * in progress and does not yet have an effect (b/264593489). - */ -export enum FieldOptions_OptionTargetType { - TARGET_TYPE_UNKNOWN = 0, - TARGET_TYPE_FILE = 1, - TARGET_TYPE_EXTENSION_RANGE = 2, - TARGET_TYPE_MESSAGE = 3, - TARGET_TYPE_FIELD = 4, - TARGET_TYPE_ONEOF = 5, - TARGET_TYPE_ENUM = 6, - TARGET_TYPE_ENUM_ENTRY = 7, - TARGET_TYPE_SERVICE = 8, - TARGET_TYPE_METHOD = 9, - UNRECOGNIZED = -1, -} - -export function fieldOptions_OptionTargetTypeFromJSON(object: any): FieldOptions_OptionTargetType { - switch (object) { - case 0: - case "TARGET_TYPE_UNKNOWN": - return FieldOptions_OptionTargetType.TARGET_TYPE_UNKNOWN; - case 1: - case "TARGET_TYPE_FILE": - return FieldOptions_OptionTargetType.TARGET_TYPE_FILE; - case 2: - case "TARGET_TYPE_EXTENSION_RANGE": - return FieldOptions_OptionTargetType.TARGET_TYPE_EXTENSION_RANGE; - case 3: - case "TARGET_TYPE_MESSAGE": - return FieldOptions_OptionTargetType.TARGET_TYPE_MESSAGE; - case 4: - case "TARGET_TYPE_FIELD": - return FieldOptions_OptionTargetType.TARGET_TYPE_FIELD; - case 5: - case "TARGET_TYPE_ONEOF": - return FieldOptions_OptionTargetType.TARGET_TYPE_ONEOF; - case 6: - case "TARGET_TYPE_ENUM": - return FieldOptions_OptionTargetType.TARGET_TYPE_ENUM; - case 7: - case "TARGET_TYPE_ENUM_ENTRY": - return FieldOptions_OptionTargetType.TARGET_TYPE_ENUM_ENTRY; - case 8: - case "TARGET_TYPE_SERVICE": - return FieldOptions_OptionTargetType.TARGET_TYPE_SERVICE; - case 9: - case "TARGET_TYPE_METHOD": - return FieldOptions_OptionTargetType.TARGET_TYPE_METHOD; - case -1: - case "UNRECOGNIZED": - default: - return FieldOptions_OptionTargetType.UNRECOGNIZED; - } -} - -export function fieldOptions_OptionTargetTypeToJSON(object: FieldOptions_OptionTargetType): string { - switch (object) { - case FieldOptions_OptionTargetType.TARGET_TYPE_UNKNOWN: - return "TARGET_TYPE_UNKNOWN"; - case FieldOptions_OptionTargetType.TARGET_TYPE_FILE: - return "TARGET_TYPE_FILE"; - case FieldOptions_OptionTargetType.TARGET_TYPE_EXTENSION_RANGE: - return "TARGET_TYPE_EXTENSION_RANGE"; - case FieldOptions_OptionTargetType.TARGET_TYPE_MESSAGE: - return "TARGET_TYPE_MESSAGE"; - case FieldOptions_OptionTargetType.TARGET_TYPE_FIELD: - return "TARGET_TYPE_FIELD"; - case FieldOptions_OptionTargetType.TARGET_TYPE_ONEOF: - return "TARGET_TYPE_ONEOF"; - case FieldOptions_OptionTargetType.TARGET_TYPE_ENUM: - return "TARGET_TYPE_ENUM"; - case FieldOptions_OptionTargetType.TARGET_TYPE_ENUM_ENTRY: - return "TARGET_TYPE_ENUM_ENTRY"; - case FieldOptions_OptionTargetType.TARGET_TYPE_SERVICE: - return "TARGET_TYPE_SERVICE"; - case FieldOptions_OptionTargetType.TARGET_TYPE_METHOD: - return "TARGET_TYPE_METHOD"; - case FieldOptions_OptionTargetType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export interface FieldOptions_EditionDefault { - edition?: - | Edition - | undefined; - /** Textproto value. */ - value?: string | undefined; -} - -/** Information about the support window of a feature. */ -export interface FieldOptions_FeatureSupport { - /** - * The edition that this feature was first available in. In editions - * earlier than this one, the default assigned to EDITION_LEGACY will be - * used, and proto files will not be able to override it. - */ - edition_introduced?: - | Edition - | undefined; - /** - * The edition this feature becomes deprecated in. Using this after this - * edition may trigger warnings. - */ - edition_deprecated?: - | Edition - | undefined; - /** - * The deprecation warning text if this feature is used after the edition it - * was marked deprecated in. - */ - deprecation_warning?: - | string - | undefined; - /** - * The edition this feature is no longer available in. In editions after - * this one, the last default assigned will be used, and proto files will - * not be able to override it. - */ - edition_removed?: Edition | undefined; -} - export interface OneofOptions { - /** Any features defined in the specific edition. */ - features?: - | FeatureSet - | undefined; /** The parser stores options it doesn't recognize here. See above. */ uninterpreted_option: UninterpretedOption[]; } @@ -1366,23 +931,6 @@ export interface EnumOptions { deprecated?: | boolean | undefined; - /** - * Enable the legacy handling of JSON field name conflicts. This lowercases - * and strips underscored from the fields before comparison in proto3 only. - * The new behavior takes `json_name` into account and applies to proto2 as - * well. - * TODO Remove this legacy behavior once downstream teams have - * had time to migrate. - * - * @deprecated - */ - deprecated_legacy_json_field_conflicts?: - | boolean - | undefined; - /** Any features defined in the specific edition. */ - features?: - | FeatureSet - | undefined; /** The parser stores options it doesn't recognize here. See above. */ uninterpreted_option: UninterpretedOption[]; } @@ -1397,31 +945,11 @@ export interface EnumValueOptions { deprecated?: | boolean | undefined; - /** Any features defined in the specific edition. */ - features?: - | FeatureSet - | undefined; - /** - * Indicate that fields annotated with this enum value should not be printed - * out when using debug formats, e.g. when the field contains sensitive - * credentials. - */ - debug_redact?: - | boolean - | undefined; - /** Information about the support window of a feature value. */ - feature_support?: - | FieldOptions_FeatureSupport - | undefined; /** The parser stores options it doesn't recognize here. See above. */ uninterpreted_option: UninterpretedOption[]; } export interface ServiceOptions { - /** Any features defined in the specific edition. */ - features?: - | FeatureSet - | undefined; /** * Is this service deprecated? * Depending on the target platform, this can emit Deprecated annotations @@ -1446,10 +974,6 @@ export interface MethodOptions { idempotency_level?: | MethodOptions_IdempotencyLevel | undefined; - /** Any features defined in the specific edition. */ - features?: - | FeatureSet - | undefined; /** The parser stores options it doesn't recognize here. See above. */ uninterpreted_option: UninterpretedOption[]; } @@ -1535,353 +1059,56 @@ export interface UninterpretedOption_NamePart { } /** - * TODO Enums in C++ gencode (and potentially other languages) are - * not well scoped. This means that each of the feature enums below can clash - * with each other. The short names we've chosen maximize call-site - * readability, but leave us very open to this scenario. A future feature will - * be designed and implemented to handle this, hopefully before we ever hit a - * conflict here. + * Encapsulates information about the original source file from which a + * FileDescriptorProto was generated. */ -export interface FeatureSet { - field_presence?: FeatureSet_FieldPresence | undefined; - enum_type?: FeatureSet_EnumType | undefined; - repeated_field_encoding?: FeatureSet_RepeatedFieldEncoding | undefined; - utf8_validation?: FeatureSet_Utf8Validation | undefined; - message_encoding?: FeatureSet_MessageEncoding | undefined; - json_format?: FeatureSet_JsonFormat | undefined; -} - -export enum FeatureSet_FieldPresence { - FIELD_PRESENCE_UNKNOWN = 0, - EXPLICIT = 1, - IMPLICIT = 2, - LEGACY_REQUIRED = 3, - UNRECOGNIZED = -1, -} - -export function featureSet_FieldPresenceFromJSON(object: any): FeatureSet_FieldPresence { - switch (object) { - case 0: - case "FIELD_PRESENCE_UNKNOWN": - return FeatureSet_FieldPresence.FIELD_PRESENCE_UNKNOWN; - case 1: - case "EXPLICIT": - return FeatureSet_FieldPresence.EXPLICIT; - case 2: - case "IMPLICIT": - return FeatureSet_FieldPresence.IMPLICIT; - case 3: - case "LEGACY_REQUIRED": - return FeatureSet_FieldPresence.LEGACY_REQUIRED; - case -1: - case "UNRECOGNIZED": - default: - return FeatureSet_FieldPresence.UNRECOGNIZED; - } -} - -export function featureSet_FieldPresenceToJSON(object: FeatureSet_FieldPresence): string { - switch (object) { - case FeatureSet_FieldPresence.FIELD_PRESENCE_UNKNOWN: - return "FIELD_PRESENCE_UNKNOWN"; - case FeatureSet_FieldPresence.EXPLICIT: - return "EXPLICIT"; - case FeatureSet_FieldPresence.IMPLICIT: - return "IMPLICIT"; - case FeatureSet_FieldPresence.LEGACY_REQUIRED: - return "LEGACY_REQUIRED"; - case FeatureSet_FieldPresence.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export enum FeatureSet_EnumType { - ENUM_TYPE_UNKNOWN = 0, - OPEN = 1, - CLOSED = 2, - UNRECOGNIZED = -1, -} - -export function featureSet_EnumTypeFromJSON(object: any): FeatureSet_EnumType { - switch (object) { - case 0: - case "ENUM_TYPE_UNKNOWN": - return FeatureSet_EnumType.ENUM_TYPE_UNKNOWN; - case 1: - case "OPEN": - return FeatureSet_EnumType.OPEN; - case 2: - case "CLOSED": - return FeatureSet_EnumType.CLOSED; - case -1: - case "UNRECOGNIZED": - default: - return FeatureSet_EnumType.UNRECOGNIZED; - } -} - -export function featureSet_EnumTypeToJSON(object: FeatureSet_EnumType): string { - switch (object) { - case FeatureSet_EnumType.ENUM_TYPE_UNKNOWN: - return "ENUM_TYPE_UNKNOWN"; - case FeatureSet_EnumType.OPEN: - return "OPEN"; - case FeatureSet_EnumType.CLOSED: - return "CLOSED"; - case FeatureSet_EnumType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export enum FeatureSet_RepeatedFieldEncoding { - REPEATED_FIELD_ENCODING_UNKNOWN = 0, - PACKED = 1, - EXPANDED = 2, - UNRECOGNIZED = -1, -} - -export function featureSet_RepeatedFieldEncodingFromJSON(object: any): FeatureSet_RepeatedFieldEncoding { - switch (object) { - case 0: - case "REPEATED_FIELD_ENCODING_UNKNOWN": - return FeatureSet_RepeatedFieldEncoding.REPEATED_FIELD_ENCODING_UNKNOWN; - case 1: - case "PACKED": - return FeatureSet_RepeatedFieldEncoding.PACKED; - case 2: - case "EXPANDED": - return FeatureSet_RepeatedFieldEncoding.EXPANDED; - case -1: - case "UNRECOGNIZED": - default: - return FeatureSet_RepeatedFieldEncoding.UNRECOGNIZED; - } -} - -export function featureSet_RepeatedFieldEncodingToJSON(object: FeatureSet_RepeatedFieldEncoding): string { - switch (object) { - case FeatureSet_RepeatedFieldEncoding.REPEATED_FIELD_ENCODING_UNKNOWN: - return "REPEATED_FIELD_ENCODING_UNKNOWN"; - case FeatureSet_RepeatedFieldEncoding.PACKED: - return "PACKED"; - case FeatureSet_RepeatedFieldEncoding.EXPANDED: - return "EXPANDED"; - case FeatureSet_RepeatedFieldEncoding.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export enum FeatureSet_Utf8Validation { - UTF8_VALIDATION_UNKNOWN = 0, - VERIFY = 2, - NONE = 3, - UNRECOGNIZED = -1, -} - -export function featureSet_Utf8ValidationFromJSON(object: any): FeatureSet_Utf8Validation { - switch (object) { - case 0: - case "UTF8_VALIDATION_UNKNOWN": - return FeatureSet_Utf8Validation.UTF8_VALIDATION_UNKNOWN; - case 2: - case "VERIFY": - return FeatureSet_Utf8Validation.VERIFY; - case 3: - case "NONE": - return FeatureSet_Utf8Validation.NONE; - case -1: - case "UNRECOGNIZED": - default: - return FeatureSet_Utf8Validation.UNRECOGNIZED; - } -} - -export function featureSet_Utf8ValidationToJSON(object: FeatureSet_Utf8Validation): string { - switch (object) { - case FeatureSet_Utf8Validation.UTF8_VALIDATION_UNKNOWN: - return "UTF8_VALIDATION_UNKNOWN"; - case FeatureSet_Utf8Validation.VERIFY: - return "VERIFY"; - case FeatureSet_Utf8Validation.NONE: - return "NONE"; - case FeatureSet_Utf8Validation.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export enum FeatureSet_MessageEncoding { - MESSAGE_ENCODING_UNKNOWN = 0, - LENGTH_PREFIXED = 1, - DELIMITED = 2, - UNRECOGNIZED = -1, -} - -export function featureSet_MessageEncodingFromJSON(object: any): FeatureSet_MessageEncoding { - switch (object) { - case 0: - case "MESSAGE_ENCODING_UNKNOWN": - return FeatureSet_MessageEncoding.MESSAGE_ENCODING_UNKNOWN; - case 1: - case "LENGTH_PREFIXED": - return FeatureSet_MessageEncoding.LENGTH_PREFIXED; - case 2: - case "DELIMITED": - return FeatureSet_MessageEncoding.DELIMITED; - case -1: - case "UNRECOGNIZED": - default: - return FeatureSet_MessageEncoding.UNRECOGNIZED; - } -} - -export function featureSet_MessageEncodingToJSON(object: FeatureSet_MessageEncoding): string { - switch (object) { - case FeatureSet_MessageEncoding.MESSAGE_ENCODING_UNKNOWN: - return "MESSAGE_ENCODING_UNKNOWN"; - case FeatureSet_MessageEncoding.LENGTH_PREFIXED: - return "LENGTH_PREFIXED"; - case FeatureSet_MessageEncoding.DELIMITED: - return "DELIMITED"; - case FeatureSet_MessageEncoding.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export enum FeatureSet_JsonFormat { - JSON_FORMAT_UNKNOWN = 0, - ALLOW = 1, - LEGACY_BEST_EFFORT = 2, - UNRECOGNIZED = -1, -} - -export function featureSet_JsonFormatFromJSON(object: any): FeatureSet_JsonFormat { - switch (object) { - case 0: - case "JSON_FORMAT_UNKNOWN": - return FeatureSet_JsonFormat.JSON_FORMAT_UNKNOWN; - case 1: - case "ALLOW": - return FeatureSet_JsonFormat.ALLOW; - case 2: - case "LEGACY_BEST_EFFORT": - return FeatureSet_JsonFormat.LEGACY_BEST_EFFORT; - case -1: - case "UNRECOGNIZED": - default: - return FeatureSet_JsonFormat.UNRECOGNIZED; - } -} - -export function featureSet_JsonFormatToJSON(object: FeatureSet_JsonFormat): string { - switch (object) { - case FeatureSet_JsonFormat.JSON_FORMAT_UNKNOWN: - return "JSON_FORMAT_UNKNOWN"; - case FeatureSet_JsonFormat.ALLOW: - return "ALLOW"; - case FeatureSet_JsonFormat.LEGACY_BEST_EFFORT: - return "LEGACY_BEST_EFFORT"; - case FeatureSet_JsonFormat.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -/** - * A compiled specification for the defaults of a set of features. These - * messages are generated from FeatureSet extensions and can be used to seed - * feature resolution. The resolution with this object becomes a simple search - * for the closest matching edition, followed by proto merges. - */ -export interface FeatureSetDefaults { - defaults: FeatureSetDefaults_FeatureSetEditionDefault[]; - /** - * The minimum supported edition (inclusive) when this was constructed. - * Editions before this will not have defaults. - */ - minimum_edition?: - | Edition - | undefined; - /** - * The maximum known edition (inclusive) when this was constructed. Editions - * after this will not have reliable defaults. - */ - maximum_edition?: Edition | undefined; -} - -/** - * A map from every known edition with a unique set of defaults to its - * defaults. Not all editions may be contained here. For a given edition, - * the defaults at the closest matching edition ordered at or before it should - * be used. This field must be in strict ascending order by edition. - */ -export interface FeatureSetDefaults_FeatureSetEditionDefault { - edition?: - | Edition - | undefined; - /** Defaults of features that can be overridden in this edition. */ - overridable_features?: - | FeatureSet - | undefined; - /** Defaults of features that can't be overridden in this edition. */ - fixed_features?: FeatureSet | undefined; -} - -/** - * Encapsulates information about the original source file from which a - * FileDescriptorProto was generated. - */ -export interface SourceCodeInfo { - /** - * A Location identifies a piece of source code in a .proto file which - * corresponds to a particular definition. This information is intended - * to be useful to IDEs, code indexers, documentation generators, and similar - * tools. - * - * For example, say we have a file like: - * message Foo { - * optional string foo = 1; - * } - * Let's look at just the field definition: - * optional string foo = 1; - * ^ ^^ ^^ ^ ^^^ - * a bc de f ghi - * We have the following locations: - * span path represents - * [a,i) [ 4, 0, 2, 0 ] The whole field definition. - * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - * - * Notes: - * - A location may refer to a repeated field itself (i.e. not to any - * particular index within it). This is used whenever a set of elements are - * logically enclosed in a single code segment. For example, an entire - * extend block (possibly containing multiple extension definitions) will - * have an outer location whose path refers to the "extensions" repeated - * field without an index. - * - Multiple locations may have the same path. This happens when a single - * logical declaration is spread out across multiple places. The most - * obvious example is the "extend" block again -- there may be multiple - * extend blocks in the same scope, each of which will have the same path. - * - A location's span is not always a subset of its parent's span. For - * example, the "extendee" of an extension declaration appears at the - * beginning of the "extend" block and is shared by all extensions within - * the block. - * - Just because a location's span is a subset of some other location's span - * does not mean that it is a descendant. For example, a "group" defines - * both a type and a field in a single declaration. Thus, the locations - * corresponding to the type and field and their components will overlap. - * - Code which tries to interpret locations should probably be designed to - * ignore those that it doesn't understand, as more types of locations could - * be recorded in the future. - */ - location: SourceCodeInfo_Location[]; +export interface SourceCodeInfo { + /** + * A Location identifies a piece of source code in a .proto file which + * corresponds to a particular definition. This information is intended + * to be useful to IDEs, code indexers, documentation generators, and similar + * tools. + * + * For example, say we have a file like: + * message Foo { + * optional string foo = 1; + * } + * Let's look at just the field definition: + * optional string foo = 1; + * ^ ^^ ^^ ^ ^^^ + * a bc de f ghi + * We have the following locations: + * span path represents + * [a,i) [ 4, 0, 2, 0 ] The whole field definition. + * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). + * [c,d) [ 4, 0, 2, 0, 5 ] The type (string). + * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). + * [g,h) [ 4, 0, 2, 0, 3 ] The number (1). + * + * Notes: + * - A location may refer to a repeated field itself (i.e. not to any + * particular index within it). This is used whenever a set of elements are + * logically enclosed in a single code segment. For example, an entire + * extend block (possibly containing multiple extension definitions) will + * have an outer location whose path refers to the "extensions" repeated + * field without an index. + * - Multiple locations may have the same path. This happens when a single + * logical declaration is spread out across multiple places. The most + * obvious example is the "extend" block again -- there may be multiple + * extend blocks in the same scope, each of which will have the same path. + * - A location's span is not always a subset of its parent's span. For + * example, the "extendee" of an extension declaration appears at the + * beginning of the "extend" block and is shared by all extensions within + * the block. + * - Just because a location's span is a subset of some other location's span + * does not mean that it is a descendant. For example, a "group" defines + * both a type and a field in a single declaration. Thus, the locations + * corresponding to the type and field and their components will overlap. + * - Code which tries to interpret locations should probably be designed to + * ignore those that it doesn't understand, as more types of locations could + * be recorded in the future. + */ + location: SourceCodeInfo_Location[]; } export interface SourceCodeInfo_Location { @@ -1890,7 +1117,7 @@ export interface SourceCodeInfo_Location { * location. * * Each element is a field number or an index. They form a path from - * the root FileDescriptorProto to the place where the definition appears. + * the root FileDescriptorProto to the place where the definition occurs. * For example, this path: * [ 4, 3, 2, 7, 1 ] * refers to: @@ -2005,57 +1232,10 @@ export interface GeneratedCodeInfo_Annotation { | undefined; /** * Identifies the ending offset in bytes in the generated code that - * relates to the identified object. The end offset should be one past + * relates to the identified offset. The end offset should be one past * the last relevant byte (so the length of the text = end - begin). */ end?: number | undefined; - semantic?: GeneratedCodeInfo_Annotation_Semantic | undefined; -} - -/** - * Represents the identified object's effect on the element in the original - * .proto file. - */ -export enum GeneratedCodeInfo_Annotation_Semantic { - /** NONE - There is no effect or the effect is indescribable. */ - NONE = 0, - /** SET - The element is set or otherwise mutated. */ - SET = 1, - /** ALIAS - An alias to the element is returned. */ - ALIAS = 2, - UNRECOGNIZED = -1, -} - -export function generatedCodeInfo_Annotation_SemanticFromJSON(object: any): GeneratedCodeInfo_Annotation_Semantic { - switch (object) { - case 0: - case "NONE": - return GeneratedCodeInfo_Annotation_Semantic.NONE; - case 1: - case "SET": - return GeneratedCodeInfo_Annotation_Semantic.SET; - case 2: - case "ALIAS": - return GeneratedCodeInfo_Annotation_Semantic.ALIAS; - case -1: - case "UNRECOGNIZED": - default: - return GeneratedCodeInfo_Annotation_Semantic.UNRECOGNIZED; - } -} - -export function generatedCodeInfo_Annotation_SemanticToJSON(object: GeneratedCodeInfo_Annotation_Semantic): string { - switch (object) { - case GeneratedCodeInfo_Annotation_Semantic.NONE: - return "NONE"; - case GeneratedCodeInfo_Annotation_Semantic.SET: - return "SET"; - case GeneratedCodeInfo_Annotation_Semantic.ALIAS: - return "ALIAS"; - case GeneratedCodeInfo_Annotation_Semantic.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } } function createBaseFileDescriptorSet(): FileDescriptorSet { @@ -2131,7 +1311,6 @@ function createBaseFileDescriptorProto(): FileDescriptorProto { options: undefined, source_code_info: undefined, syntax: "", - edition: 0, }; } @@ -2177,9 +1356,6 @@ export const FileDescriptorProto = { if (message.syntax !== undefined && message.syntax !== "") { writer.uint32(98).string(message.syntax); } - if (message.edition !== undefined && message.edition !== 0) { - writer.uint32(112).int32(message.edition); - } return writer; }, @@ -2294,13 +1470,6 @@ export const FileDescriptorProto = { message.syntax = reader.string(); continue; - case 14: - if (tag !== 112) { - break; - } - - message.edition = reader.int32() as any; - continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -2338,7 +1507,6 @@ export const FileDescriptorProto = { options: isSet(object.options) ? FileOptions.fromJSON(object.options) : undefined, source_code_info: isSet(object.source_code_info) ? SourceCodeInfo.fromJSON(object.source_code_info) : undefined, syntax: isSet(object.syntax) ? globalThis.String(object.syntax) : "", - edition: isSet(object.edition) ? editionFromJSON(object.edition) : 0, }; }, @@ -2380,9 +1548,6 @@ export const FileDescriptorProto = { if (message.syntax !== undefined && message.syntax !== "") { obj.syntax = message.syntax; } - if (message.edition !== undefined && message.edition !== 0) { - obj.edition = editionToJSON(message.edition); - } return obj; }, @@ -2407,7 +1572,6 @@ export const FileDescriptorProto = { ? SourceCodeInfo.fromPartial(object.source_code_info) : undefined; message.syntax = object.syntax ?? ""; - message.edition = object.edition ?? 0; return message; }, }; @@ -2801,7 +1965,7 @@ export const DescriptorProto_ReservedRange = { }; function createBaseExtensionRangeOptions(): ExtensionRangeOptions { - return { uninterpreted_option: [], declaration: [], features: undefined, verification: 1 }; + return { uninterpreted_option: [] }; } export const ExtensionRangeOptions = { @@ -2809,15 +1973,6 @@ export const ExtensionRangeOptions = { for (const v of message.uninterpreted_option) { UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); } - for (const v of message.declaration) { - ExtensionRangeOptions_Declaration.encode(v!, writer.uint32(18).fork()).ldelim(); - } - if (message.features !== undefined) { - FeatureSet.encode(message.features, writer.uint32(402).fork()).ldelim(); - } - if (message.verification !== undefined && message.verification !== 1) { - writer.uint32(24).int32(message.verification); - } return writer; }, @@ -2835,27 +1990,6 @@ export const ExtensionRangeOptions = { message.uninterpreted_option.push(UninterpretedOption.decode(reader, reader.uint32())); continue; - case 2: - if (tag !== 18) { - break; - } - - message.declaration.push(ExtensionRangeOptions_Declaration.decode(reader, reader.uint32())); - continue; - case 50: - if (tag !== 402) { - break; - } - - message.features = FeatureSet.decode(reader, reader.uint32()); - continue; - case 3: - if (tag !== 24) { - break; - } - - message.verification = reader.int32() as any; - continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -2870,13 +2004,6 @@ export const ExtensionRangeOptions = { uninterpreted_option: globalThis.Array.isArray(object?.uninterpreted_option) ? object.uninterpreted_option.map((e: any) => UninterpretedOption.fromJSON(e)) : [], - declaration: globalThis.Array.isArray(object?.declaration) - ? object.declaration.map((e: any) => ExtensionRangeOptions_Declaration.fromJSON(e)) - : [], - features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined, - verification: isSet(object.verification) - ? extensionRangeOptions_VerificationStateFromJSON(object.verification) - : 1, }; }, @@ -2885,15 +2012,6 @@ export const ExtensionRangeOptions = { if (message.uninterpreted_option?.length) { obj.uninterpreted_option = message.uninterpreted_option.map((e) => UninterpretedOption.toJSON(e)); } - if (message.declaration?.length) { - obj.declaration = message.declaration.map((e) => ExtensionRangeOptions_Declaration.toJSON(e)); - } - if (message.features !== undefined) { - obj.features = FeatureSet.toJSON(message.features); - } - if (message.verification !== undefined && message.verification !== 1) { - obj.verification = extensionRangeOptions_VerificationStateToJSON(message.verification); - } return obj; }, @@ -2903,169 +2021,45 @@ export const ExtensionRangeOptions = { fromPartial(object: DeepPartial): ExtensionRangeOptions { const message = createBaseExtensionRangeOptions(); message.uninterpreted_option = object.uninterpreted_option?.map((e) => UninterpretedOption.fromPartial(e)) || []; - message.declaration = object.declaration?.map((e) => ExtensionRangeOptions_Declaration.fromPartial(e)) || []; - message.features = (object.features !== undefined && object.features !== null) - ? FeatureSet.fromPartial(object.features) - : undefined; - message.verification = object.verification ?? 1; return message; }, }; -function createBaseExtensionRangeOptions_Declaration(): ExtensionRangeOptions_Declaration { - return { number: 0, full_name: "", type: "", reserved: false, repeated: false }; +function createBaseFieldDescriptorProto(): FieldDescriptorProto { + return { + name: "", + number: 0, + label: 1, + type: 1, + type_name: "", + extendee: "", + default_value: "", + oneof_index: 0, + json_name: "", + options: undefined, + proto3_optional: false, + }; } -export const ExtensionRangeOptions_Declaration = { - encode(message: ExtensionRangeOptions_Declaration, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const FieldDescriptorProto = { + encode(message: FieldDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== undefined && message.name !== "") { + writer.uint32(10).string(message.name); + } if (message.number !== undefined && message.number !== 0) { - writer.uint32(8).int32(message.number); + writer.uint32(24).int32(message.number); } - if (message.full_name !== undefined && message.full_name !== "") { - writer.uint32(18).string(message.full_name); + if (message.label !== undefined && message.label !== 1) { + writer.uint32(32).int32(message.label); } - if (message.type !== undefined && message.type !== "") { - writer.uint32(26).string(message.type); + if (message.type !== undefined && message.type !== 1) { + writer.uint32(40).int32(message.type); } - if (message.reserved !== undefined && message.reserved !== false) { - writer.uint32(40).bool(message.reserved); + if (message.type_name !== undefined && message.type_name !== "") { + writer.uint32(50).string(message.type_name); } - if (message.repeated !== undefined && message.repeated !== false) { - writer.uint32(48).bool(message.repeated); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): ExtensionRangeOptions_Declaration { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseExtensionRangeOptions_Declaration(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.number = reader.int32(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.full_name = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.type = reader.string(); - continue; - case 5: - if (tag !== 40) { - break; - } - - message.reserved = reader.bool(); - continue; - case 6: - if (tag !== 48) { - break; - } - - message.repeated = reader.bool(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): ExtensionRangeOptions_Declaration { - return { - number: isSet(object.number) ? globalThis.Number(object.number) : 0, - full_name: isSet(object.full_name) ? globalThis.String(object.full_name) : "", - type: isSet(object.type) ? globalThis.String(object.type) : "", - reserved: isSet(object.reserved) ? globalThis.Boolean(object.reserved) : false, - repeated: isSet(object.repeated) ? globalThis.Boolean(object.repeated) : false, - }; - }, - - toJSON(message: ExtensionRangeOptions_Declaration): unknown { - const obj: any = {}; - if (message.number !== undefined && message.number !== 0) { - obj.number = Math.round(message.number); - } - if (message.full_name !== undefined && message.full_name !== "") { - obj.full_name = message.full_name; - } - if (message.type !== undefined && message.type !== "") { - obj.type = message.type; - } - if (message.reserved !== undefined && message.reserved !== false) { - obj.reserved = message.reserved; - } - if (message.repeated !== undefined && message.repeated !== false) { - obj.repeated = message.repeated; - } - return obj; - }, - - create(base?: DeepPartial): ExtensionRangeOptions_Declaration { - return ExtensionRangeOptions_Declaration.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): ExtensionRangeOptions_Declaration { - const message = createBaseExtensionRangeOptions_Declaration(); - message.number = object.number ?? 0; - message.full_name = object.full_name ?? ""; - message.type = object.type ?? ""; - message.reserved = object.reserved ?? false; - message.repeated = object.repeated ?? false; - return message; - }, -}; - -function createBaseFieldDescriptorProto(): FieldDescriptorProto { - return { - name: "", - number: 0, - label: 1, - type: 1, - type_name: "", - extendee: "", - default_value: "", - oneof_index: 0, - json_name: "", - options: undefined, - proto3_optional: false, - }; -} - -export const FieldDescriptorProto = { - encode(message: FieldDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.name !== undefined && message.name !== "") { - writer.uint32(10).string(message.name); - } - if (message.number !== undefined && message.number !== 0) { - writer.uint32(24).int32(message.number); - } - if (message.label !== undefined && message.label !== 1) { - writer.uint32(32).int32(message.label); - } - if (message.type !== undefined && message.type !== 1) { - writer.uint32(40).int32(message.type); - } - if (message.type_name !== undefined && message.type_name !== "") { - writer.uint32(50).string(message.type_name); - } - if (message.extendee !== undefined && message.extendee !== "") { - writer.uint32(18).string(message.extendee); + if (message.extendee !== undefined && message.extendee !== "") { + writer.uint32(18).string(message.extendee); } if (message.default_value !== undefined && message.default_value !== "") { writer.uint32(58).string(message.default_value); @@ -3871,6 +2865,7 @@ function createBaseFileOptions(): FileOptions { cc_generic_services: false, java_generic_services: false, py_generic_services: false, + php_generic_services: false, deprecated: false, cc_enable_arenas: true, objc_class_prefix: "", @@ -3880,7 +2875,6 @@ function createBaseFileOptions(): FileOptions { php_namespace: "", php_metadata_namespace: "", ruby_package: "", - features: undefined, uninterpreted_option: [], }; } @@ -3917,6 +2911,9 @@ export const FileOptions = { if (message.py_generic_services !== undefined && message.py_generic_services !== false) { writer.uint32(144).bool(message.py_generic_services); } + if (message.php_generic_services !== undefined && message.php_generic_services !== false) { + writer.uint32(336).bool(message.php_generic_services); + } if (message.deprecated !== undefined && message.deprecated !== false) { writer.uint32(184).bool(message.deprecated); } @@ -3944,9 +2941,6 @@ export const FileOptions = { if (message.ruby_package !== undefined && message.ruby_package !== "") { writer.uint32(362).string(message.ruby_package); } - if (message.features !== undefined) { - FeatureSet.encode(message.features, writer.uint32(402).fork()).ldelim(); - } for (const v of message.uninterpreted_option) { UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); } @@ -4030,6 +3024,13 @@ export const FileOptions = { message.py_generic_services = reader.bool(); continue; + case 42: + if (tag !== 336) { + break; + } + + message.php_generic_services = reader.bool(); + continue; case 23: if (tag !== 184) { break; @@ -4093,13 +3094,6 @@ export const FileOptions = { message.ruby_package = reader.string(); continue; - case 50: - if (tag !== 402) { - break; - } - - message.features = FeatureSet.decode(reader, reader.uint32()); - continue; case 999: if (tag !== 7994) { break; @@ -4134,6 +3128,9 @@ export const FileOptions = { ? globalThis.Boolean(object.java_generic_services) : false, py_generic_services: isSet(object.py_generic_services) ? globalThis.Boolean(object.py_generic_services) : false, + php_generic_services: isSet(object.php_generic_services) + ? globalThis.Boolean(object.php_generic_services) + : false, deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false, cc_enable_arenas: isSet(object.cc_enable_arenas) ? globalThis.Boolean(object.cc_enable_arenas) : true, objc_class_prefix: isSet(object.objc_class_prefix) ? globalThis.String(object.objc_class_prefix) : "", @@ -4145,7 +3142,6 @@ export const FileOptions = { ? globalThis.String(object.php_metadata_namespace) : "", ruby_package: isSet(object.ruby_package) ? globalThis.String(object.ruby_package) : "", - features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined, uninterpreted_option: globalThis.Array.isArray(object?.uninterpreted_option) ? object.uninterpreted_option.map((e: any) => UninterpretedOption.fromJSON(e)) : [], @@ -4184,6 +3180,9 @@ export const FileOptions = { if (message.py_generic_services !== undefined && message.py_generic_services !== false) { obj.py_generic_services = message.py_generic_services; } + if (message.php_generic_services !== undefined && message.php_generic_services !== false) { + obj.php_generic_services = message.php_generic_services; + } if (message.deprecated !== undefined && message.deprecated !== false) { obj.deprecated = message.deprecated; } @@ -4211,9 +3210,6 @@ export const FileOptions = { if (message.ruby_package !== undefined && message.ruby_package !== "") { obj.ruby_package = message.ruby_package; } - if (message.features !== undefined) { - obj.features = FeatureSet.toJSON(message.features); - } if (message.uninterpreted_option?.length) { obj.uninterpreted_option = message.uninterpreted_option.map((e) => UninterpretedOption.toJSON(e)); } @@ -4235,6 +3231,7 @@ export const FileOptions = { message.cc_generic_services = object.cc_generic_services ?? false; message.java_generic_services = object.java_generic_services ?? false; message.py_generic_services = object.py_generic_services ?? false; + message.php_generic_services = object.php_generic_services ?? false; message.deprecated = object.deprecated ?? false; message.cc_enable_arenas = object.cc_enable_arenas ?? true; message.objc_class_prefix = object.objc_class_prefix ?? ""; @@ -4244,9 +3241,6 @@ export const FileOptions = { message.php_namespace = object.php_namespace ?? ""; message.php_metadata_namespace = object.php_metadata_namespace ?? ""; message.ruby_package = object.ruby_package ?? ""; - message.features = (object.features !== undefined && object.features !== null) - ? FeatureSet.fromPartial(object.features) - : undefined; message.uninterpreted_option = object.uninterpreted_option?.map((e) => UninterpretedOption.fromPartial(e)) || []; return message; }, @@ -4258,8 +3252,6 @@ function createBaseMessageOptions(): MessageOptions { no_standard_descriptor_accessor: false, deprecated: false, map_entry: false, - deprecated_legacy_json_field_conflicts: false, - features: undefined, uninterpreted_option: [], }; } @@ -4278,15 +3270,6 @@ export const MessageOptions = { if (message.map_entry !== undefined && message.map_entry !== false) { writer.uint32(56).bool(message.map_entry); } - if ( - message.deprecated_legacy_json_field_conflicts !== undefined && - message.deprecated_legacy_json_field_conflicts !== false - ) { - writer.uint32(88).bool(message.deprecated_legacy_json_field_conflicts); - } - if (message.features !== undefined) { - FeatureSet.encode(message.features, writer.uint32(98).fork()).ldelim(); - } for (const v of message.uninterpreted_option) { UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); } @@ -4328,20 +3311,6 @@ export const MessageOptions = { message.map_entry = reader.bool(); continue; - case 11: - if (tag !== 88) { - break; - } - - message.deprecated_legacy_json_field_conflicts = reader.bool(); - continue; - case 12: - if (tag !== 98) { - break; - } - - message.features = FeatureSet.decode(reader, reader.uint32()); - continue; case 999: if (tag !== 7994) { break; @@ -4368,10 +3337,6 @@ export const MessageOptions = { : false, deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false, map_entry: isSet(object.map_entry) ? globalThis.Boolean(object.map_entry) : false, - deprecated_legacy_json_field_conflicts: isSet(object.deprecated_legacy_json_field_conflicts) - ? globalThis.Boolean(object.deprecated_legacy_json_field_conflicts) - : false, - features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined, uninterpreted_option: globalThis.Array.isArray(object?.uninterpreted_option) ? object.uninterpreted_option.map((e: any) => UninterpretedOption.fromJSON(e)) : [], @@ -4392,15 +3357,6 @@ export const MessageOptions = { if (message.map_entry !== undefined && message.map_entry !== false) { obj.map_entry = message.map_entry; } - if ( - message.deprecated_legacy_json_field_conflicts !== undefined && - message.deprecated_legacy_json_field_conflicts !== false - ) { - obj.deprecated_legacy_json_field_conflicts = message.deprecated_legacy_json_field_conflicts; - } - if (message.features !== undefined) { - obj.features = FeatureSet.toJSON(message.features); - } if (message.uninterpreted_option?.length) { obj.uninterpreted_option = message.uninterpreted_option.map((e) => UninterpretedOption.toJSON(e)); } @@ -4416,10 +3372,6 @@ export const MessageOptions = { message.no_standard_descriptor_accessor = object.no_standard_descriptor_accessor ?? false; message.deprecated = object.deprecated ?? false; message.map_entry = object.map_entry ?? false; - message.deprecated_legacy_json_field_conflicts = object.deprecated_legacy_json_field_conflicts ?? false; - message.features = (object.features !== undefined && object.features !== null) - ? FeatureSet.fromPartial(object.features) - : undefined; message.uninterpreted_option = object.uninterpreted_option?.map((e) => UninterpretedOption.fromPartial(e)) || []; return message; }, @@ -4434,12 +3386,6 @@ function createBaseFieldOptions(): FieldOptions { unverified_lazy: false, deprecated: false, weak: false, - debug_redact: false, - retention: 0, - targets: [], - edition_defaults: [], - features: undefined, - feature_support: undefined, uninterpreted_option: [], }; } @@ -4467,26 +3413,6 @@ export const FieldOptions = { if (message.weak !== undefined && message.weak !== false) { writer.uint32(80).bool(message.weak); } - if (message.debug_redact !== undefined && message.debug_redact !== false) { - writer.uint32(128).bool(message.debug_redact); - } - if (message.retention !== undefined && message.retention !== 0) { - writer.uint32(136).int32(message.retention); - } - writer.uint32(154).fork(); - for (const v of message.targets) { - writer.int32(v); - } - writer.ldelim(); - for (const v of message.edition_defaults) { - FieldOptions_EditionDefault.encode(v!, writer.uint32(162).fork()).ldelim(); - } - if (message.features !== undefined) { - FeatureSet.encode(message.features, writer.uint32(170).fork()).ldelim(); - } - if (message.feature_support !== undefined) { - FieldOptions_FeatureSupport.encode(message.feature_support, writer.uint32(178).fork()).ldelim(); - } for (const v of message.uninterpreted_option) { UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); } @@ -4549,58 +3475,6 @@ export const FieldOptions = { message.weak = reader.bool(); continue; - case 16: - if (tag !== 128) { - break; - } - - message.debug_redact = reader.bool(); - continue; - case 17: - if (tag !== 136) { - break; - } - - message.retention = reader.int32() as any; - continue; - case 19: - if (tag === 152) { - message.targets.push(reader.int32() as any); - - continue; - } - - if (tag === 154) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.targets.push(reader.int32() as any); - } - - continue; - } - - break; - case 20: - if (tag !== 162) { - break; - } - - message.edition_defaults.push(FieldOptions_EditionDefault.decode(reader, reader.uint32())); - continue; - case 21: - if (tag !== 170) { - break; - } - - message.features = FeatureSet.decode(reader, reader.uint32()); - continue; - case 22: - if (tag !== 178) { - break; - } - - message.feature_support = FieldOptions_FeatureSupport.decode(reader, reader.uint32()); - continue; case 999: if (tag !== 7994) { break; @@ -4626,18 +3500,6 @@ export const FieldOptions = { unverified_lazy: isSet(object.unverified_lazy) ? globalThis.Boolean(object.unverified_lazy) : false, deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false, weak: isSet(object.weak) ? globalThis.Boolean(object.weak) : false, - debug_redact: isSet(object.debug_redact) ? globalThis.Boolean(object.debug_redact) : false, - retention: isSet(object.retention) ? fieldOptions_OptionRetentionFromJSON(object.retention) : 0, - targets: globalThis.Array.isArray(object?.targets) - ? object.targets.map((e: any) => fieldOptions_OptionTargetTypeFromJSON(e)) - : [], - edition_defaults: globalThis.Array.isArray(object?.edition_defaults) - ? object.edition_defaults.map((e: any) => FieldOptions_EditionDefault.fromJSON(e)) - : [], - features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined, - feature_support: isSet(object.feature_support) - ? FieldOptions_FeatureSupport.fromJSON(object.feature_support) - : undefined, uninterpreted_option: globalThis.Array.isArray(object?.uninterpreted_option) ? object.uninterpreted_option.map((e: any) => UninterpretedOption.fromJSON(e)) : [], @@ -4667,24 +3529,6 @@ export const FieldOptions = { if (message.weak !== undefined && message.weak !== false) { obj.weak = message.weak; } - if (message.debug_redact !== undefined && message.debug_redact !== false) { - obj.debug_redact = message.debug_redact; - } - if (message.retention !== undefined && message.retention !== 0) { - obj.retention = fieldOptions_OptionRetentionToJSON(message.retention); - } - if (message.targets?.length) { - obj.targets = message.targets.map((e) => fieldOptions_OptionTargetTypeToJSON(e)); - } - if (message.edition_defaults?.length) { - obj.edition_defaults = message.edition_defaults.map((e) => FieldOptions_EditionDefault.toJSON(e)); - } - if (message.features !== undefined) { - obj.features = FeatureSet.toJSON(message.features); - } - if (message.feature_support !== undefined) { - obj.feature_support = FieldOptions_FeatureSupport.toJSON(message.feature_support); - } if (message.uninterpreted_option?.length) { obj.uninterpreted_option = message.uninterpreted_option.map((e) => UninterpretedOption.toJSON(e)); } @@ -4703,56 +3547,36 @@ export const FieldOptions = { message.unverified_lazy = object.unverified_lazy ?? false; message.deprecated = object.deprecated ?? false; message.weak = object.weak ?? false; - message.debug_redact = object.debug_redact ?? false; - message.retention = object.retention ?? 0; - message.targets = object.targets?.map((e) => e) || []; - message.edition_defaults = object.edition_defaults?.map((e) => FieldOptions_EditionDefault.fromPartial(e)) || []; - message.features = (object.features !== undefined && object.features !== null) - ? FeatureSet.fromPartial(object.features) - : undefined; - message.feature_support = (object.feature_support !== undefined && object.feature_support !== null) - ? FieldOptions_FeatureSupport.fromPartial(object.feature_support) - : undefined; message.uninterpreted_option = object.uninterpreted_option?.map((e) => UninterpretedOption.fromPartial(e)) || []; return message; }, }; -function createBaseFieldOptions_EditionDefault(): FieldOptions_EditionDefault { - return { edition: 0, value: "" }; +function createBaseOneofOptions(): OneofOptions { + return { uninterpreted_option: [] }; } -export const FieldOptions_EditionDefault = { - encode(message: FieldOptions_EditionDefault, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.edition !== undefined && message.edition !== 0) { - writer.uint32(24).int32(message.edition); - } - if (message.value !== undefined && message.value !== "") { - writer.uint32(18).string(message.value); +export const OneofOptions = { + encode(message: OneofOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.uninterpreted_option) { + UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): FieldOptions_EditionDefault { + decode(input: _m0.Reader | Uint8Array, length?: number): OneofOptions { const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFieldOptions_EditionDefault(); + const message = createBaseOneofOptions(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 3: - if (tag !== 24) { - break; - } - - message.edition = reader.int32() as any; - continue; - case 2: - if (tag !== 18) { + case 999: + if (tag !== 7994) { break; } - message.value = reader.string(); + message.uninterpreted_option.push(UninterpretedOption.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -4763,90 +3587,77 @@ export const FieldOptions_EditionDefault = { return message; }, - fromJSON(object: any): FieldOptions_EditionDefault { + fromJSON(object: any): OneofOptions { return { - edition: isSet(object.edition) ? editionFromJSON(object.edition) : 0, - value: isSet(object.value) ? globalThis.String(object.value) : "", + uninterpreted_option: globalThis.Array.isArray(object?.uninterpreted_option) + ? object.uninterpreted_option.map((e: any) => UninterpretedOption.fromJSON(e)) + : [], }; }, - toJSON(message: FieldOptions_EditionDefault): unknown { + toJSON(message: OneofOptions): unknown { const obj: any = {}; - if (message.edition !== undefined && message.edition !== 0) { - obj.edition = editionToJSON(message.edition); - } - if (message.value !== undefined && message.value !== "") { - obj.value = message.value; + if (message.uninterpreted_option?.length) { + obj.uninterpreted_option = message.uninterpreted_option.map((e) => UninterpretedOption.toJSON(e)); } return obj; }, - create(base?: DeepPartial): FieldOptions_EditionDefault { - return FieldOptions_EditionDefault.fromPartial(base ?? {}); + create(base?: DeepPartial): OneofOptions { + return OneofOptions.fromPartial(base ?? {}); }, - fromPartial(object: DeepPartial): FieldOptions_EditionDefault { - const message = createBaseFieldOptions_EditionDefault(); - message.edition = object.edition ?? 0; - message.value = object.value ?? ""; + fromPartial(object: DeepPartial): OneofOptions { + const message = createBaseOneofOptions(); + message.uninterpreted_option = object.uninterpreted_option?.map((e) => UninterpretedOption.fromPartial(e)) || []; return message; }, }; -function createBaseFieldOptions_FeatureSupport(): FieldOptions_FeatureSupport { - return { edition_introduced: 0, edition_deprecated: 0, deprecation_warning: "", edition_removed: 0 }; +function createBaseEnumOptions(): EnumOptions { + return { allow_alias: false, deprecated: false, uninterpreted_option: [] }; } -export const FieldOptions_FeatureSupport = { - encode(message: FieldOptions_FeatureSupport, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.edition_introduced !== undefined && message.edition_introduced !== 0) { - writer.uint32(8).int32(message.edition_introduced); - } - if (message.edition_deprecated !== undefined && message.edition_deprecated !== 0) { - writer.uint32(16).int32(message.edition_deprecated); +export const EnumOptions = { + encode(message: EnumOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.allow_alias !== undefined && message.allow_alias !== false) { + writer.uint32(16).bool(message.allow_alias); } - if (message.deprecation_warning !== undefined && message.deprecation_warning !== "") { - writer.uint32(26).string(message.deprecation_warning); + if (message.deprecated !== undefined && message.deprecated !== false) { + writer.uint32(24).bool(message.deprecated); } - if (message.edition_removed !== undefined && message.edition_removed !== 0) { - writer.uint32(32).int32(message.edition_removed); + for (const v of message.uninterpreted_option) { + UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): FieldOptions_FeatureSupport { + decode(input: _m0.Reader | Uint8Array, length?: number): EnumOptions { const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFieldOptions_FeatureSupport(); + const message = createBaseEnumOptions(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.edition_introduced = reader.int32() as any; - continue; case 2: if (tag !== 16) { break; } - message.edition_deprecated = reader.int32() as any; + message.allow_alias = reader.bool(); continue; case 3: - if (tag !== 26) { + if (tag !== 24) { break; } - message.deprecation_warning = reader.string(); + message.deprecated = reader.bool(); continue; - case 4: - if (tag !== 32) { + case 999: + if (tag !== 7994) { break; } - message.edition_removed = reader.int32() as any; + message.uninterpreted_option.push(UninterpretedOption.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -4857,268 +3668,44 @@ export const FieldOptions_FeatureSupport = { return message; }, - fromJSON(object: any): FieldOptions_FeatureSupport { + fromJSON(object: any): EnumOptions { return { - edition_introduced: isSet(object.edition_introduced) ? editionFromJSON(object.edition_introduced) : 0, - edition_deprecated: isSet(object.edition_deprecated) ? editionFromJSON(object.edition_deprecated) : 0, - deprecation_warning: isSet(object.deprecation_warning) ? globalThis.String(object.deprecation_warning) : "", - edition_removed: isSet(object.edition_removed) ? editionFromJSON(object.edition_removed) : 0, + allow_alias: isSet(object.allow_alias) ? globalThis.Boolean(object.allow_alias) : false, + deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false, + uninterpreted_option: globalThis.Array.isArray(object?.uninterpreted_option) + ? object.uninterpreted_option.map((e: any) => UninterpretedOption.fromJSON(e)) + : [], }; }, - toJSON(message: FieldOptions_FeatureSupport): unknown { + toJSON(message: EnumOptions): unknown { const obj: any = {}; - if (message.edition_introduced !== undefined && message.edition_introduced !== 0) { - obj.edition_introduced = editionToJSON(message.edition_introduced); - } - if (message.edition_deprecated !== undefined && message.edition_deprecated !== 0) { - obj.edition_deprecated = editionToJSON(message.edition_deprecated); + if (message.allow_alias !== undefined && message.allow_alias !== false) { + obj.allow_alias = message.allow_alias; } - if (message.deprecation_warning !== undefined && message.deprecation_warning !== "") { - obj.deprecation_warning = message.deprecation_warning; + if (message.deprecated !== undefined && message.deprecated !== false) { + obj.deprecated = message.deprecated; } - if (message.edition_removed !== undefined && message.edition_removed !== 0) { - obj.edition_removed = editionToJSON(message.edition_removed); + if (message.uninterpreted_option?.length) { + obj.uninterpreted_option = message.uninterpreted_option.map((e) => UninterpretedOption.toJSON(e)); } return obj; }, - create(base?: DeepPartial): FieldOptions_FeatureSupport { - return FieldOptions_FeatureSupport.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): FieldOptions_FeatureSupport { - const message = createBaseFieldOptions_FeatureSupport(); - message.edition_introduced = object.edition_introduced ?? 0; - message.edition_deprecated = object.edition_deprecated ?? 0; - message.deprecation_warning = object.deprecation_warning ?? ""; - message.edition_removed = object.edition_removed ?? 0; - return message; - }, -}; - -function createBaseOneofOptions(): OneofOptions { - return { features: undefined, uninterpreted_option: [] }; -} - -export const OneofOptions = { - encode(message: OneofOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.features !== undefined) { - FeatureSet.encode(message.features, writer.uint32(10).fork()).ldelim(); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): OneofOptions { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseOneofOptions(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.features = FeatureSet.decode(reader, reader.uint32()); - continue; - case 999: - if (tag !== 7994) { - break; - } - - message.uninterpreted_option.push(UninterpretedOption.decode(reader, reader.uint32())); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): OneofOptions { - return { - features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined, - uninterpreted_option: globalThis.Array.isArray(object?.uninterpreted_option) - ? object.uninterpreted_option.map((e: any) => UninterpretedOption.fromJSON(e)) - : [], - }; - }, - - toJSON(message: OneofOptions): unknown { - const obj: any = {}; - if (message.features !== undefined) { - obj.features = FeatureSet.toJSON(message.features); - } - if (message.uninterpreted_option?.length) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => UninterpretedOption.toJSON(e)); - } - return obj; - }, - - create(base?: DeepPartial): OneofOptions { - return OneofOptions.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): OneofOptions { - const message = createBaseOneofOptions(); - message.features = (object.features !== undefined && object.features !== null) - ? FeatureSet.fromPartial(object.features) - : undefined; - message.uninterpreted_option = object.uninterpreted_option?.map((e) => UninterpretedOption.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseEnumOptions(): EnumOptions { - return { - allow_alias: false, - deprecated: false, - deprecated_legacy_json_field_conflicts: false, - features: undefined, - uninterpreted_option: [], - }; -} - -export const EnumOptions = { - encode(message: EnumOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.allow_alias !== undefined && message.allow_alias !== false) { - writer.uint32(16).bool(message.allow_alias); - } - if (message.deprecated !== undefined && message.deprecated !== false) { - writer.uint32(24).bool(message.deprecated); - } - if ( - message.deprecated_legacy_json_field_conflicts !== undefined && - message.deprecated_legacy_json_field_conflicts !== false - ) { - writer.uint32(48).bool(message.deprecated_legacy_json_field_conflicts); - } - if (message.features !== undefined) { - FeatureSet.encode(message.features, writer.uint32(58).fork()).ldelim(); - } - for (const v of message.uninterpreted_option) { - UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): EnumOptions { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEnumOptions(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - if (tag !== 16) { - break; - } - - message.allow_alias = reader.bool(); - continue; - case 3: - if (tag !== 24) { - break; - } - - message.deprecated = reader.bool(); - continue; - case 6: - if (tag !== 48) { - break; - } - - message.deprecated_legacy_json_field_conflicts = reader.bool(); - continue; - case 7: - if (tag !== 58) { - break; - } - - message.features = FeatureSet.decode(reader, reader.uint32()); - continue; - case 999: - if (tag !== 7994) { - break; - } - - message.uninterpreted_option.push(UninterpretedOption.decode(reader, reader.uint32())); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): EnumOptions { - return { - allow_alias: isSet(object.allow_alias) ? globalThis.Boolean(object.allow_alias) : false, - deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false, - deprecated_legacy_json_field_conflicts: isSet(object.deprecated_legacy_json_field_conflicts) - ? globalThis.Boolean(object.deprecated_legacy_json_field_conflicts) - : false, - features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined, - uninterpreted_option: globalThis.Array.isArray(object?.uninterpreted_option) - ? object.uninterpreted_option.map((e: any) => UninterpretedOption.fromJSON(e)) - : [], - }; - }, - - toJSON(message: EnumOptions): unknown { - const obj: any = {}; - if (message.allow_alias !== undefined && message.allow_alias !== false) { - obj.allow_alias = message.allow_alias; - } - if (message.deprecated !== undefined && message.deprecated !== false) { - obj.deprecated = message.deprecated; - } - if ( - message.deprecated_legacy_json_field_conflicts !== undefined && - message.deprecated_legacy_json_field_conflicts !== false - ) { - obj.deprecated_legacy_json_field_conflicts = message.deprecated_legacy_json_field_conflicts; - } - if (message.features !== undefined) { - obj.features = FeatureSet.toJSON(message.features); - } - if (message.uninterpreted_option?.length) { - obj.uninterpreted_option = message.uninterpreted_option.map((e) => UninterpretedOption.toJSON(e)); - } - return obj; - }, - - create(base?: DeepPartial): EnumOptions { - return EnumOptions.fromPartial(base ?? {}); + create(base?: DeepPartial): EnumOptions { + return EnumOptions.fromPartial(base ?? {}); }, fromPartial(object: DeepPartial): EnumOptions { const message = createBaseEnumOptions(); message.allow_alias = object.allow_alias ?? false; message.deprecated = object.deprecated ?? false; - message.deprecated_legacy_json_field_conflicts = object.deprecated_legacy_json_field_conflicts ?? false; - message.features = (object.features !== undefined && object.features !== null) - ? FeatureSet.fromPartial(object.features) - : undefined; message.uninterpreted_option = object.uninterpreted_option?.map((e) => UninterpretedOption.fromPartial(e)) || []; return message; }, }; function createBaseEnumValueOptions(): EnumValueOptions { - return { - deprecated: false, - features: undefined, - debug_redact: false, - feature_support: undefined, - uninterpreted_option: [], - }; + return { deprecated: false, uninterpreted_option: [] }; } export const EnumValueOptions = { @@ -5126,15 +3713,6 @@ export const EnumValueOptions = { if (message.deprecated !== undefined && message.deprecated !== false) { writer.uint32(8).bool(message.deprecated); } - if (message.features !== undefined) { - FeatureSet.encode(message.features, writer.uint32(18).fork()).ldelim(); - } - if (message.debug_redact !== undefined && message.debug_redact !== false) { - writer.uint32(24).bool(message.debug_redact); - } - if (message.feature_support !== undefined) { - FieldOptions_FeatureSupport.encode(message.feature_support, writer.uint32(34).fork()).ldelim(); - } for (const v of message.uninterpreted_option) { UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); } @@ -5155,27 +3733,6 @@ export const EnumValueOptions = { message.deprecated = reader.bool(); continue; - case 2: - if (tag !== 18) { - break; - } - - message.features = FeatureSet.decode(reader, reader.uint32()); - continue; - case 3: - if (tag !== 24) { - break; - } - - message.debug_redact = reader.bool(); - continue; - case 4: - if (tag !== 34) { - break; - } - - message.feature_support = FieldOptions_FeatureSupport.decode(reader, reader.uint32()); - continue; case 999: if (tag !== 7994) { break; @@ -5195,11 +3752,6 @@ export const EnumValueOptions = { fromJSON(object: any): EnumValueOptions { return { deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false, - features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined, - debug_redact: isSet(object.debug_redact) ? globalThis.Boolean(object.debug_redact) : false, - feature_support: isSet(object.feature_support) - ? FieldOptions_FeatureSupport.fromJSON(object.feature_support) - : undefined, uninterpreted_option: globalThis.Array.isArray(object?.uninterpreted_option) ? object.uninterpreted_option.map((e: any) => UninterpretedOption.fromJSON(e)) : [], @@ -5211,15 +3763,6 @@ export const EnumValueOptions = { if (message.deprecated !== undefined && message.deprecated !== false) { obj.deprecated = message.deprecated; } - if (message.features !== undefined) { - obj.features = FeatureSet.toJSON(message.features); - } - if (message.debug_redact !== undefined && message.debug_redact !== false) { - obj.debug_redact = message.debug_redact; - } - if (message.feature_support !== undefined) { - obj.feature_support = FieldOptions_FeatureSupport.toJSON(message.feature_support); - } if (message.uninterpreted_option?.length) { obj.uninterpreted_option = message.uninterpreted_option.map((e) => UninterpretedOption.toJSON(e)); } @@ -5232,27 +3775,17 @@ export const EnumValueOptions = { fromPartial(object: DeepPartial): EnumValueOptions { const message = createBaseEnumValueOptions(); message.deprecated = object.deprecated ?? false; - message.features = (object.features !== undefined && object.features !== null) - ? FeatureSet.fromPartial(object.features) - : undefined; - message.debug_redact = object.debug_redact ?? false; - message.feature_support = (object.feature_support !== undefined && object.feature_support !== null) - ? FieldOptions_FeatureSupport.fromPartial(object.feature_support) - : undefined; message.uninterpreted_option = object.uninterpreted_option?.map((e) => UninterpretedOption.fromPartial(e)) || []; return message; }, }; function createBaseServiceOptions(): ServiceOptions { - return { features: undefined, deprecated: false, uninterpreted_option: [] }; + return { deprecated: false, uninterpreted_option: [] }; } export const ServiceOptions = { encode(message: ServiceOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.features !== undefined) { - FeatureSet.encode(message.features, writer.uint32(274).fork()).ldelim(); - } if (message.deprecated !== undefined && message.deprecated !== false) { writer.uint32(264).bool(message.deprecated); } @@ -5269,13 +3802,6 @@ export const ServiceOptions = { while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 34: - if (tag !== 274) { - break; - } - - message.features = FeatureSet.decode(reader, reader.uint32()); - continue; case 33: if (tag !== 264) { break; @@ -5301,7 +3827,6 @@ export const ServiceOptions = { fromJSON(object: any): ServiceOptions { return { - features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined, deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false, uninterpreted_option: globalThis.Array.isArray(object?.uninterpreted_option) ? object.uninterpreted_option.map((e: any) => UninterpretedOption.fromJSON(e)) @@ -5311,9 +3836,6 @@ export const ServiceOptions = { toJSON(message: ServiceOptions): unknown { const obj: any = {}; - if (message.features !== undefined) { - obj.features = FeatureSet.toJSON(message.features); - } if (message.deprecated !== undefined && message.deprecated !== false) { obj.deprecated = message.deprecated; } @@ -5328,9 +3850,6 @@ export const ServiceOptions = { }, fromPartial(object: DeepPartial): ServiceOptions { const message = createBaseServiceOptions(); - message.features = (object.features !== undefined && object.features !== null) - ? FeatureSet.fromPartial(object.features) - : undefined; message.deprecated = object.deprecated ?? false; message.uninterpreted_option = object.uninterpreted_option?.map((e) => UninterpretedOption.fromPartial(e)) || []; return message; @@ -5338,7 +3857,7 @@ export const ServiceOptions = { }; function createBaseMethodOptions(): MethodOptions { - return { deprecated: false, idempotency_level: 0, features: undefined, uninterpreted_option: [] }; + return { deprecated: false, idempotency_level: 0, uninterpreted_option: [] }; } export const MethodOptions = { @@ -5349,9 +3868,6 @@ export const MethodOptions = { if (message.idempotency_level !== undefined && message.idempotency_level !== 0) { writer.uint32(272).int32(message.idempotency_level); } - if (message.features !== undefined) { - FeatureSet.encode(message.features, writer.uint32(282).fork()).ldelim(); - } for (const v of message.uninterpreted_option) { UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); } @@ -5379,13 +3895,6 @@ export const MethodOptions = { message.idempotency_level = reader.int32() as any; continue; - case 35: - if (tag !== 282) { - break; - } - - message.features = FeatureSet.decode(reader, reader.uint32()); - continue; case 999: if (tag !== 7994) { break; @@ -5408,7 +3917,6 @@ export const MethodOptions = { idempotency_level: isSet(object.idempotency_level) ? methodOptions_IdempotencyLevelFromJSON(object.idempotency_level) : 0, - features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined, uninterpreted_option: globalThis.Array.isArray(object?.uninterpreted_option) ? object.uninterpreted_option.map((e: any) => UninterpretedOption.fromJSON(e)) : [], @@ -5423,9 +3931,6 @@ export const MethodOptions = { if (message.idempotency_level !== undefined && message.idempotency_level !== 0) { obj.idempotency_level = methodOptions_IdempotencyLevelToJSON(message.idempotency_level); } - if (message.features !== undefined) { - obj.features = FeatureSet.toJSON(message.features); - } if (message.uninterpreted_option?.length) { obj.uninterpreted_option = message.uninterpreted_option.map((e) => UninterpretedOption.toJSON(e)); } @@ -5439,9 +3944,6 @@ export const MethodOptions = { const message = createBaseMethodOptions(); message.deprecated = object.deprecated ?? false; message.idempotency_level = object.idempotency_level ?? 0; - message.features = (object.features !== undefined && object.features !== null) - ? FeatureSet.fromPartial(object.features) - : undefined; message.uninterpreted_option = object.uninterpreted_option?.map((e) => UninterpretedOption.fromPartial(e)) || []; return message; }, @@ -5680,339 +4182,6 @@ export const UninterpretedOption_NamePart = { }, }; -function createBaseFeatureSet(): FeatureSet { - return { - field_presence: 0, - enum_type: 0, - repeated_field_encoding: 0, - utf8_validation: 0, - message_encoding: 0, - json_format: 0, - }; -} - -export const FeatureSet = { - encode(message: FeatureSet, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.field_presence !== undefined && message.field_presence !== 0) { - writer.uint32(8).int32(message.field_presence); - } - if (message.enum_type !== undefined && message.enum_type !== 0) { - writer.uint32(16).int32(message.enum_type); - } - if (message.repeated_field_encoding !== undefined && message.repeated_field_encoding !== 0) { - writer.uint32(24).int32(message.repeated_field_encoding); - } - if (message.utf8_validation !== undefined && message.utf8_validation !== 0) { - writer.uint32(32).int32(message.utf8_validation); - } - if (message.message_encoding !== undefined && message.message_encoding !== 0) { - writer.uint32(40).int32(message.message_encoding); - } - if (message.json_format !== undefined && message.json_format !== 0) { - writer.uint32(48).int32(message.json_format); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): FeatureSet { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFeatureSet(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 8) { - break; - } - - message.field_presence = reader.int32() as any; - continue; - case 2: - if (tag !== 16) { - break; - } - - message.enum_type = reader.int32() as any; - continue; - case 3: - if (tag !== 24) { - break; - } - - message.repeated_field_encoding = reader.int32() as any; - continue; - case 4: - if (tag !== 32) { - break; - } - - message.utf8_validation = reader.int32() as any; - continue; - case 5: - if (tag !== 40) { - break; - } - - message.message_encoding = reader.int32() as any; - continue; - case 6: - if (tag !== 48) { - break; - } - - message.json_format = reader.int32() as any; - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): FeatureSet { - return { - field_presence: isSet(object.field_presence) ? featureSet_FieldPresenceFromJSON(object.field_presence) : 0, - enum_type: isSet(object.enum_type) ? featureSet_EnumTypeFromJSON(object.enum_type) : 0, - repeated_field_encoding: isSet(object.repeated_field_encoding) - ? featureSet_RepeatedFieldEncodingFromJSON(object.repeated_field_encoding) - : 0, - utf8_validation: isSet(object.utf8_validation) ? featureSet_Utf8ValidationFromJSON(object.utf8_validation) : 0, - message_encoding: isSet(object.message_encoding) - ? featureSet_MessageEncodingFromJSON(object.message_encoding) - : 0, - json_format: isSet(object.json_format) ? featureSet_JsonFormatFromJSON(object.json_format) : 0, - }; - }, - - toJSON(message: FeatureSet): unknown { - const obj: any = {}; - if (message.field_presence !== undefined && message.field_presence !== 0) { - obj.field_presence = featureSet_FieldPresenceToJSON(message.field_presence); - } - if (message.enum_type !== undefined && message.enum_type !== 0) { - obj.enum_type = featureSet_EnumTypeToJSON(message.enum_type); - } - if (message.repeated_field_encoding !== undefined && message.repeated_field_encoding !== 0) { - obj.repeated_field_encoding = featureSet_RepeatedFieldEncodingToJSON(message.repeated_field_encoding); - } - if (message.utf8_validation !== undefined && message.utf8_validation !== 0) { - obj.utf8_validation = featureSet_Utf8ValidationToJSON(message.utf8_validation); - } - if (message.message_encoding !== undefined && message.message_encoding !== 0) { - obj.message_encoding = featureSet_MessageEncodingToJSON(message.message_encoding); - } - if (message.json_format !== undefined && message.json_format !== 0) { - obj.json_format = featureSet_JsonFormatToJSON(message.json_format); - } - return obj; - }, - - create(base?: DeepPartial): FeatureSet { - return FeatureSet.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): FeatureSet { - const message = createBaseFeatureSet(); - message.field_presence = object.field_presence ?? 0; - message.enum_type = object.enum_type ?? 0; - message.repeated_field_encoding = object.repeated_field_encoding ?? 0; - message.utf8_validation = object.utf8_validation ?? 0; - message.message_encoding = object.message_encoding ?? 0; - message.json_format = object.json_format ?? 0; - return message; - }, -}; - -function createBaseFeatureSetDefaults(): FeatureSetDefaults { - return { defaults: [], minimum_edition: 0, maximum_edition: 0 }; -} - -export const FeatureSetDefaults = { - encode(message: FeatureSetDefaults, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.defaults) { - FeatureSetDefaults_FeatureSetEditionDefault.encode(v!, writer.uint32(10).fork()).ldelim(); - } - if (message.minimum_edition !== undefined && message.minimum_edition !== 0) { - writer.uint32(32).int32(message.minimum_edition); - } - if (message.maximum_edition !== undefined && message.maximum_edition !== 0) { - writer.uint32(40).int32(message.maximum_edition); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): FeatureSetDefaults { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFeatureSetDefaults(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.defaults.push(FeatureSetDefaults_FeatureSetEditionDefault.decode(reader, reader.uint32())); - continue; - case 4: - if (tag !== 32) { - break; - } - - message.minimum_edition = reader.int32() as any; - continue; - case 5: - if (tag !== 40) { - break; - } - - message.maximum_edition = reader.int32() as any; - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): FeatureSetDefaults { - return { - defaults: globalThis.Array.isArray(object?.defaults) - ? object.defaults.map((e: any) => FeatureSetDefaults_FeatureSetEditionDefault.fromJSON(e)) - : [], - minimum_edition: isSet(object.minimum_edition) ? editionFromJSON(object.minimum_edition) : 0, - maximum_edition: isSet(object.maximum_edition) ? editionFromJSON(object.maximum_edition) : 0, - }; - }, - - toJSON(message: FeatureSetDefaults): unknown { - const obj: any = {}; - if (message.defaults?.length) { - obj.defaults = message.defaults.map((e) => FeatureSetDefaults_FeatureSetEditionDefault.toJSON(e)); - } - if (message.minimum_edition !== undefined && message.minimum_edition !== 0) { - obj.minimum_edition = editionToJSON(message.minimum_edition); - } - if (message.maximum_edition !== undefined && message.maximum_edition !== 0) { - obj.maximum_edition = editionToJSON(message.maximum_edition); - } - return obj; - }, - - create(base?: DeepPartial): FeatureSetDefaults { - return FeatureSetDefaults.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): FeatureSetDefaults { - const message = createBaseFeatureSetDefaults(); - message.defaults = object.defaults?.map((e) => FeatureSetDefaults_FeatureSetEditionDefault.fromPartial(e)) || []; - message.minimum_edition = object.minimum_edition ?? 0; - message.maximum_edition = object.maximum_edition ?? 0; - return message; - }, -}; - -function createBaseFeatureSetDefaults_FeatureSetEditionDefault(): FeatureSetDefaults_FeatureSetEditionDefault { - return { edition: 0, overridable_features: undefined, fixed_features: undefined }; -} - -export const FeatureSetDefaults_FeatureSetEditionDefault = { - encode(message: FeatureSetDefaults_FeatureSetEditionDefault, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.edition !== undefined && message.edition !== 0) { - writer.uint32(24).int32(message.edition); - } - if (message.overridable_features !== undefined) { - FeatureSet.encode(message.overridable_features, writer.uint32(34).fork()).ldelim(); - } - if (message.fixed_features !== undefined) { - FeatureSet.encode(message.fixed_features, writer.uint32(42).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): FeatureSetDefaults_FeatureSetEditionDefault { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFeatureSetDefaults_FeatureSetEditionDefault(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 3: - if (tag !== 24) { - break; - } - - message.edition = reader.int32() as any; - continue; - case 4: - if (tag !== 34) { - break; - } - - message.overridable_features = FeatureSet.decode(reader, reader.uint32()); - continue; - case 5: - if (tag !== 42) { - break; - } - - message.fixed_features = FeatureSet.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): FeatureSetDefaults_FeatureSetEditionDefault { - return { - edition: isSet(object.edition) ? editionFromJSON(object.edition) : 0, - overridable_features: isSet(object.overridable_features) - ? FeatureSet.fromJSON(object.overridable_features) - : undefined, - fixed_features: isSet(object.fixed_features) ? FeatureSet.fromJSON(object.fixed_features) : undefined, - }; - }, - - toJSON(message: FeatureSetDefaults_FeatureSetEditionDefault): unknown { - const obj: any = {}; - if (message.edition !== undefined && message.edition !== 0) { - obj.edition = editionToJSON(message.edition); - } - if (message.overridable_features !== undefined) { - obj.overridable_features = FeatureSet.toJSON(message.overridable_features); - } - if (message.fixed_features !== undefined) { - obj.fixed_features = FeatureSet.toJSON(message.fixed_features); - } - return obj; - }, - - create(base?: DeepPartial): FeatureSetDefaults_FeatureSetEditionDefault { - return FeatureSetDefaults_FeatureSetEditionDefault.fromPartial(base ?? {}); - }, - fromPartial( - object: DeepPartial, - ): FeatureSetDefaults_FeatureSetEditionDefault { - const message = createBaseFeatureSetDefaults_FeatureSetEditionDefault(); - message.edition = object.edition ?? 0; - message.overridable_features = (object.overridable_features !== undefined && object.overridable_features !== null) - ? FeatureSet.fromPartial(object.overridable_features) - : undefined; - message.fixed_features = (object.fixed_features !== undefined && object.fixed_features !== null) - ? FeatureSet.fromPartial(object.fixed_features) - : undefined; - return message; - }, -}; - function createBaseSourceCodeInfo(): SourceCodeInfo { return { location: [] }; } @@ -6281,7 +4450,7 @@ export const GeneratedCodeInfo = { }; function createBaseGeneratedCodeInfo_Annotation(): GeneratedCodeInfo_Annotation { - return { path: [], source_file: "", begin: 0, end: 0, semantic: 0 }; + return { path: [], source_file: "", begin: 0, end: 0 }; } export const GeneratedCodeInfo_Annotation = { @@ -6300,9 +4469,6 @@ export const GeneratedCodeInfo_Annotation = { if (message.end !== undefined && message.end !== 0) { writer.uint32(32).int32(message.end); } - if (message.semantic !== undefined && message.semantic !== 0) { - writer.uint32(40).int32(message.semantic); - } return writer; }, @@ -6351,13 +4517,6 @@ export const GeneratedCodeInfo_Annotation = { message.end = reader.int32(); continue; - case 5: - if (tag !== 40) { - break; - } - - message.semantic = reader.int32() as any; - continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -6373,7 +4532,6 @@ export const GeneratedCodeInfo_Annotation = { source_file: isSet(object.source_file) ? globalThis.String(object.source_file) : "", begin: isSet(object.begin) ? globalThis.Number(object.begin) : 0, end: isSet(object.end) ? globalThis.Number(object.end) : 0, - semantic: isSet(object.semantic) ? generatedCodeInfo_Annotation_SemanticFromJSON(object.semantic) : 0, }; }, @@ -6391,9 +4549,6 @@ export const GeneratedCodeInfo_Annotation = { if (message.end !== undefined && message.end !== 0) { obj.end = Math.round(message.end); } - if (message.semantic !== undefined && message.semantic !== 0) { - obj.semantic = generatedCodeInfo_Annotation_SemanticToJSON(message.semantic); - } return obj; }, @@ -6406,7 +4561,6 @@ export const GeneratedCodeInfo_Annotation = { message.source_file = object.source_file ?? ""; message.begin = object.begin ?? 0; message.end = object.end ?? 0; - message.semantic = object.semantic ?? 0; return message; }, }; diff --git a/src/protobuf/google/protobuf/duration.ts b/src/protobuf/google/protobuf/duration.ts index 0a50c4c6..a89c52c5 100644 --- a/src/protobuf/google/protobuf/duration.ts +++ b/src/protobuf/google/protobuf/duration.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: google/protobuf/duration.proto /* eslint-disable */ diff --git a/src/protobuf/google/protobuf/empty.ts b/src/protobuf/google/protobuf/empty.ts index a76d4ee2..8250b5c4 100644 --- a/src/protobuf/google/protobuf/empty.ts +++ b/src/protobuf/google/protobuf/empty.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: google/protobuf/empty.proto /* eslint-disable */ diff --git a/src/protobuf/google/protobuf/timestamp.ts b/src/protobuf/google/protobuf/timestamp.ts index 19d37c67..6eaa4f7a 100644 --- a/src/protobuf/google/protobuf/timestamp.ts +++ b/src/protobuf/google/protobuf/timestamp.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: google/protobuf/timestamp.proto /* eslint-disable */ diff --git a/src/protobuf/ibc-apps/packetforward/v1/genesis.ts b/src/protobuf/ibc-apps/packetforward/v1/genesis.ts index 36e2d7a8..691db8dc 100644 --- a/src/protobuf/ibc-apps/packetforward/v1/genesis.ts +++ b/src/protobuf/ibc-apps/packetforward/v1/genesis.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc-apps/packetforward/v1/genesis.proto /* eslint-disable */ diff --git a/src/protobuf/ibc-apps/packetforward/v1/query.ts b/src/protobuf/ibc-apps/packetforward/v1/query.ts index 9cc89b92..5964cf93 100644 --- a/src/protobuf/ibc-apps/packetforward/v1/query.ts +++ b/src/protobuf/ibc-apps/packetforward/v1/query.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc-apps/packetforward/v1/query.proto /* eslint-disable */ diff --git a/src/protobuf/ibc-apps/packetforward/v1/tx.ts b/src/protobuf/ibc-apps/packetforward/v1/tx.ts index d837976f..40919f82 100644 --- a/src/protobuf/ibc-apps/packetforward/v1/tx.ts +++ b/src/protobuf/ibc-apps/packetforward/v1/tx.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc-apps/packetforward/v1/tx.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/applications/fee/v1/ack.ts b/src/protobuf/ibc/applications/fee/v1/ack.ts index 91010cbb..8a32def7 100644 --- a/src/protobuf/ibc/applications/fee/v1/ack.ts +++ b/src/protobuf/ibc/applications/fee/v1/ack.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/applications/fee/v1/ack.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/applications/fee/v1/fee.ts b/src/protobuf/ibc/applications/fee/v1/fee.ts index 4a5b1280..1934656f 100644 --- a/src/protobuf/ibc/applications/fee/v1/fee.ts +++ b/src/protobuf/ibc/applications/fee/v1/fee.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/applications/fee/v1/fee.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/applications/fee/v1/genesis.ts b/src/protobuf/ibc/applications/fee/v1/genesis.ts index c4301c55..0c21e958 100644 --- a/src/protobuf/ibc/applications/fee/v1/genesis.ts +++ b/src/protobuf/ibc/applications/fee/v1/genesis.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/applications/fee/v1/genesis.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/applications/fee/v1/metadata.ts b/src/protobuf/ibc/applications/fee/v1/metadata.ts index 53950b07..ca17be5c 100644 --- a/src/protobuf/ibc/applications/fee/v1/metadata.ts +++ b/src/protobuf/ibc/applications/fee/v1/metadata.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/applications/fee/v1/metadata.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/applications/fee/v1/query.ts b/src/protobuf/ibc/applications/fee/v1/query.ts index f63eb1d7..f5b8ae2a 100644 --- a/src/protobuf/ibc/applications/fee/v1/query.ts +++ b/src/protobuf/ibc/applications/fee/v1/query.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/applications/fee/v1/query.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/applications/fee/v1/tx.ts b/src/protobuf/ibc/applications/fee/v1/tx.ts index 7a3de597..d4f7b90a 100644 --- a/src/protobuf/ibc/applications/fee/v1/tx.ts +++ b/src/protobuf/ibc/applications/fee/v1/tx.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/applications/fee/v1/tx.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/applications/interchain_accounts/controller/v1/controller.ts b/src/protobuf/ibc/applications/interchain_accounts/controller/v1/controller.ts index 4b7f50aa..a4201a90 100644 --- a/src/protobuf/ibc/applications/interchain_accounts/controller/v1/controller.ts +++ b/src/protobuf/ibc/applications/interchain_accounts/controller/v1/controller.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/applications/interchain_accounts/controller/v1/controller.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/applications/interchain_accounts/controller/v1/query.ts b/src/protobuf/ibc/applications/interchain_accounts/controller/v1/query.ts index 83711236..6d880387 100644 --- a/src/protobuf/ibc/applications/interchain_accounts/controller/v1/query.ts +++ b/src/protobuf/ibc/applications/interchain_accounts/controller/v1/query.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/applications/interchain_accounts/controller/v1/query.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/applications/interchain_accounts/controller/v1/tx.ts b/src/protobuf/ibc/applications/interchain_accounts/controller/v1/tx.ts index 2b216ad5..707d7550 100644 --- a/src/protobuf/ibc/applications/interchain_accounts/controller/v1/tx.ts +++ b/src/protobuf/ibc/applications/interchain_accounts/controller/v1/tx.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/applications/interchain_accounts/controller/v1/tx.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/applications/interchain_accounts/genesis/v1/genesis.ts b/src/protobuf/ibc/applications/interchain_accounts/genesis/v1/genesis.ts index 5509116a..a9509715 100644 --- a/src/protobuf/ibc/applications/interchain_accounts/genesis/v1/genesis.ts +++ b/src/protobuf/ibc/applications/interchain_accounts/genesis/v1/genesis.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/applications/interchain_accounts/genesis/v1/genesis.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/applications/interchain_accounts/host/v1/host.ts b/src/protobuf/ibc/applications/interchain_accounts/host/v1/host.ts index 3cd9eedf..4ded93bd 100644 --- a/src/protobuf/ibc/applications/interchain_accounts/host/v1/host.ts +++ b/src/protobuf/ibc/applications/interchain_accounts/host/v1/host.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/applications/interchain_accounts/host/v1/host.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/applications/interchain_accounts/host/v1/query.ts b/src/protobuf/ibc/applications/interchain_accounts/host/v1/query.ts index ce64c051..95dbbce9 100644 --- a/src/protobuf/ibc/applications/interchain_accounts/host/v1/query.ts +++ b/src/protobuf/ibc/applications/interchain_accounts/host/v1/query.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/applications/interchain_accounts/host/v1/query.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/applications/interchain_accounts/host/v1/tx.ts b/src/protobuf/ibc/applications/interchain_accounts/host/v1/tx.ts index 8659d41a..e611c2aa 100644 --- a/src/protobuf/ibc/applications/interchain_accounts/host/v1/tx.ts +++ b/src/protobuf/ibc/applications/interchain_accounts/host/v1/tx.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/applications/interchain_accounts/host/v1/tx.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/applications/interchain_accounts/v1/account.ts b/src/protobuf/ibc/applications/interchain_accounts/v1/account.ts index 3d86983f..d190c84c 100644 --- a/src/protobuf/ibc/applications/interchain_accounts/v1/account.ts +++ b/src/protobuf/ibc/applications/interchain_accounts/v1/account.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/applications/interchain_accounts/v1/account.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/applications/interchain_accounts/v1/metadata.ts b/src/protobuf/ibc/applications/interchain_accounts/v1/metadata.ts index 43ea4dd5..a7791db0 100644 --- a/src/protobuf/ibc/applications/interchain_accounts/v1/metadata.ts +++ b/src/protobuf/ibc/applications/interchain_accounts/v1/metadata.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/applications/interchain_accounts/v1/metadata.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/applications/interchain_accounts/v1/packet.ts b/src/protobuf/ibc/applications/interchain_accounts/v1/packet.ts index 6528513b..eb300995 100644 --- a/src/protobuf/ibc/applications/interchain_accounts/v1/packet.ts +++ b/src/protobuf/ibc/applications/interchain_accounts/v1/packet.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/applications/interchain_accounts/v1/packet.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/applications/transfer/v1/authz.ts b/src/protobuf/ibc/applications/transfer/v1/authz.ts index 7000c152..12f1c189 100644 --- a/src/protobuf/ibc/applications/transfer/v1/authz.ts +++ b/src/protobuf/ibc/applications/transfer/v1/authz.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/applications/transfer/v1/authz.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/applications/transfer/v1/genesis.ts b/src/protobuf/ibc/applications/transfer/v1/genesis.ts index 18f708f9..775b953e 100644 --- a/src/protobuf/ibc/applications/transfer/v1/genesis.ts +++ b/src/protobuf/ibc/applications/transfer/v1/genesis.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/applications/transfer/v1/genesis.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/applications/transfer/v1/query.ts b/src/protobuf/ibc/applications/transfer/v1/query.ts index c67cd954..04e10dfe 100644 --- a/src/protobuf/ibc/applications/transfer/v1/query.ts +++ b/src/protobuf/ibc/applications/transfer/v1/query.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/applications/transfer/v1/query.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/applications/transfer/v1/transfer.ts b/src/protobuf/ibc/applications/transfer/v1/transfer.ts index 3517b90e..4aa99718 100644 --- a/src/protobuf/ibc/applications/transfer/v1/transfer.ts +++ b/src/protobuf/ibc/applications/transfer/v1/transfer.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/applications/transfer/v1/transfer.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/applications/transfer/v1/tx.ts b/src/protobuf/ibc/applications/transfer/v1/tx.ts index e3a5c0e2..620df2c4 100644 --- a/src/protobuf/ibc/applications/transfer/v1/tx.ts +++ b/src/protobuf/ibc/applications/transfer/v1/tx.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/applications/transfer/v1/tx.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/applications/transfer/v2/packet.ts b/src/protobuf/ibc/applications/transfer/v2/packet.ts index 1cacf88c..9fc8e858 100644 --- a/src/protobuf/ibc/applications/transfer/v2/packet.ts +++ b/src/protobuf/ibc/applications/transfer/v2/packet.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/applications/transfer/v2/packet.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/core/channel/v1/channel.ts b/src/protobuf/ibc/core/channel/v1/channel.ts index de8c1d3f..af389e3e 100644 --- a/src/protobuf/ibc/core/channel/v1/channel.ts +++ b/src/protobuf/ibc/core/channel/v1/channel.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/core/channel/v1/channel.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/core/channel/v1/channel_upgrade.ts b/src/protobuf/ibc/core/channel/v1/channel_upgrade.ts index 08ff14e4..e5724b04 100644 --- a/src/protobuf/ibc/core/channel/v1/channel_upgrade.ts +++ b/src/protobuf/ibc/core/channel/v1/channel_upgrade.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/core/channel/v1/channel_upgrade.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/core/channel/v1/genesis.ts b/src/protobuf/ibc/core/channel/v1/genesis.ts index 0e92ee97..4153a329 100644 --- a/src/protobuf/ibc/core/channel/v1/genesis.ts +++ b/src/protobuf/ibc/core/channel/v1/genesis.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/core/channel/v1/genesis.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/core/channel/v1/query.ts b/src/protobuf/ibc/core/channel/v1/query.ts index d0c02356..aa53ce05 100644 --- a/src/protobuf/ibc/core/channel/v1/query.ts +++ b/src/protobuf/ibc/core/channel/v1/query.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/core/channel/v1/query.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/core/channel/v1/tx.ts b/src/protobuf/ibc/core/channel/v1/tx.ts index 994bbff2..e70b5c0a 100644 --- a/src/protobuf/ibc/core/channel/v1/tx.ts +++ b/src/protobuf/ibc/core/channel/v1/tx.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/core/channel/v1/tx.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/core/client/v1/client.ts b/src/protobuf/ibc/core/client/v1/client.ts index ba145a31..f75b1d4e 100644 --- a/src/protobuf/ibc/core/client/v1/client.ts +++ b/src/protobuf/ibc/core/client/v1/client.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/core/client/v1/client.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/core/client/v1/genesis.ts b/src/protobuf/ibc/core/client/v1/genesis.ts index 27ff8e30..4225b340 100644 --- a/src/protobuf/ibc/core/client/v1/genesis.ts +++ b/src/protobuf/ibc/core/client/v1/genesis.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/core/client/v1/genesis.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/core/client/v1/query.ts b/src/protobuf/ibc/core/client/v1/query.ts index 87c0bdd0..87785c2b 100644 --- a/src/protobuf/ibc/core/client/v1/query.ts +++ b/src/protobuf/ibc/core/client/v1/query.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/core/client/v1/query.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/core/client/v1/tx.ts b/src/protobuf/ibc/core/client/v1/tx.ts index 47471582..59f84e73 100644 --- a/src/protobuf/ibc/core/client/v1/tx.ts +++ b/src/protobuf/ibc/core/client/v1/tx.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/core/client/v1/tx.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/core/commitment/v1/commitment.ts b/src/protobuf/ibc/core/commitment/v1/commitment.ts index 42eb5f16..2ebbcbb9 100644 --- a/src/protobuf/ibc/core/commitment/v1/commitment.ts +++ b/src/protobuf/ibc/core/commitment/v1/commitment.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/core/commitment/v1/commitment.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/core/connection/v1/connection.ts b/src/protobuf/ibc/core/connection/v1/connection.ts index 95947a38..6db0bf64 100644 --- a/src/protobuf/ibc/core/connection/v1/connection.ts +++ b/src/protobuf/ibc/core/connection/v1/connection.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/core/connection/v1/connection.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/core/connection/v1/genesis.ts b/src/protobuf/ibc/core/connection/v1/genesis.ts index a45f0466..fed39a9a 100644 --- a/src/protobuf/ibc/core/connection/v1/genesis.ts +++ b/src/protobuf/ibc/core/connection/v1/genesis.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/core/connection/v1/genesis.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/core/connection/v1/query.ts b/src/protobuf/ibc/core/connection/v1/query.ts index 4cf48922..f8e2128f 100644 --- a/src/protobuf/ibc/core/connection/v1/query.ts +++ b/src/protobuf/ibc/core/connection/v1/query.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/core/connection/v1/query.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/core/connection/v1/tx.ts b/src/protobuf/ibc/core/connection/v1/tx.ts index 6c1767ad..0f33cc76 100644 --- a/src/protobuf/ibc/core/connection/v1/tx.ts +++ b/src/protobuf/ibc/core/connection/v1/tx.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/core/connection/v1/tx.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/core/types/v1/genesis.ts b/src/protobuf/ibc/core/types/v1/genesis.ts index 4204b1a8..39881b81 100644 --- a/src/protobuf/ibc/core/types/v1/genesis.ts +++ b/src/protobuf/ibc/core/types/v1/genesis.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/core/types/v1/genesis.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/lightclients/localhost/v2/localhost.ts b/src/protobuf/ibc/lightclients/localhost/v2/localhost.ts index 884ef224..86cd4665 100644 --- a/src/protobuf/ibc/lightclients/localhost/v2/localhost.ts +++ b/src/protobuf/ibc/lightclients/localhost/v2/localhost.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/lightclients/localhost/v2/localhost.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/lightclients/solomachine/v2/solomachine.ts b/src/protobuf/ibc/lightclients/solomachine/v2/solomachine.ts index 9f39cfa5..e6beddcb 100644 --- a/src/protobuf/ibc/lightclients/solomachine/v2/solomachine.ts +++ b/src/protobuf/ibc/lightclients/solomachine/v2/solomachine.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/lightclients/solomachine/v2/solomachine.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/lightclients/solomachine/v3/solomachine.ts b/src/protobuf/ibc/lightclients/solomachine/v3/solomachine.ts index d861750d..4721c764 100644 --- a/src/protobuf/ibc/lightclients/solomachine/v3/solomachine.ts +++ b/src/protobuf/ibc/lightclients/solomachine/v3/solomachine.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/lightclients/solomachine/v3/solomachine.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/lightclients/tendermint/v1/tendermint.ts b/src/protobuf/ibc/lightclients/tendermint/v1/tendermint.ts index abf527e8..3de52871 100644 --- a/src/protobuf/ibc/lightclients/tendermint/v1/tendermint.ts +++ b/src/protobuf/ibc/lightclients/tendermint/v1/tendermint.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: ibc/lightclients/tendermint/v1/tendermint.proto /* eslint-disable */ diff --git a/src/protobuf/ibc/lightclients/wasm/v1/genesis.ts b/src/protobuf/ibc/lightclients/wasm/v1/genesis.ts deleted file mode 100644 index f9634bb9..00000000 --- a/src/protobuf/ibc/lightclients/wasm/v1/genesis.ts +++ /dev/null @@ -1,177 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 -// source: ibc/lightclients/wasm/v1/genesis.proto - -/* eslint-disable */ -import * as _m0 from "protobufjs/minimal"; - -export const protobufPackage = "ibc.lightclients.wasm.v1"; - -/** GenesisState defines 08-wasm's keeper genesis state */ -export interface GenesisState { - /** uploaded light client wasm contracts */ - contracts: Contract[]; -} - -/** Contract stores contract code */ -export interface Contract { - /** contract byte code */ - code_bytes: Uint8Array; -} - -function createBaseGenesisState(): GenesisState { - return { contracts: [] }; -} - -export const GenesisState = { - encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.contracts) { - Contract.encode(v!, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): GenesisState { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGenesisState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.contracts.push(Contract.decode(reader, reader.uint32())); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): GenesisState { - return { - contracts: globalThis.Array.isArray(object?.contracts) - ? object.contracts.map((e: any) => Contract.fromJSON(e)) - : [], - }; - }, - - toJSON(message: GenesisState): unknown { - const obj: any = {}; - if (message.contracts?.length) { - obj.contracts = message.contracts.map((e) => Contract.toJSON(e)); - } - return obj; - }, - - create(base?: DeepPartial): GenesisState { - return GenesisState.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): GenesisState { - const message = createBaseGenesisState(); - message.contracts = object.contracts?.map((e) => Contract.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseContract(): Contract { - return { code_bytes: new Uint8Array(0) }; -} - -export const Contract = { - encode(message: Contract, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.code_bytes.length !== 0) { - writer.uint32(10).bytes(message.code_bytes); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Contract { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseContract(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.code_bytes = reader.bytes(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): Contract { - return { code_bytes: isSet(object.code_bytes) ? bytesFromBase64(object.code_bytes) : new Uint8Array(0) }; - }, - - toJSON(message: Contract): unknown { - const obj: any = {}; - if (message.code_bytes.length !== 0) { - obj.code_bytes = base64FromBytes(message.code_bytes); - } - return obj; - }, - - create(base?: DeepPartial): Contract { - return Contract.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): Contract { - const message = createBaseContract(); - message.code_bytes = object.code_bytes ?? new Uint8Array(0); - return message; - }, -}; - -function bytesFromBase64(b64: string): Uint8Array { - if ((globalThis as any).Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if ((globalThis as any).Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(globalThis.String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin ? T - : T extends globalThis.Array ? globalThis.Array> - : T extends ReadonlyArray ? ReadonlyArray> - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/protobuf/ibc/lightclients/wasm/v1/query.ts b/src/protobuf/ibc/lightclients/wasm/v1/query.ts deleted file mode 100644 index 40c40c40..00000000 --- a/src/protobuf/ibc/lightclients/wasm/v1/query.ts +++ /dev/null @@ -1,359 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 -// source: ibc/lightclients/wasm/v1/query.proto - -/* eslint-disable */ -import * as _m0 from "protobufjs/minimal"; -import { PageRequest, PageResponse } from "../../../../cosmos/base/query/v1beta1/pagination"; - -export const protobufPackage = "ibc.lightclients.wasm.v1"; - -/** QueryChecksumsRequest is the request type for the Query/Checksums RPC method. */ -export interface QueryChecksumsRequest { - /** pagination defines an optional pagination for the request. */ - pagination?: PageRequest | undefined; -} - -/** QueryChecksumsResponse is the response type for the Query/Checksums RPC method. */ -export interface QueryChecksumsResponse { - /** checksums is a list of the hex encoded checksums of all wasm codes stored. */ - checksums: string[]; - /** pagination defines the pagination in the response. */ - pagination?: PageResponse | undefined; -} - -/** QueryCodeRequest is the request type for the Query/Code RPC method. */ -export interface QueryCodeRequest { - /** checksum is a hex encoded string of the code stored. */ - checksum: string; -} - -/** QueryCodeResponse is the response type for the Query/Code RPC method. */ -export interface QueryCodeResponse { - data: Uint8Array; -} - -function createBaseQueryChecksumsRequest(): QueryChecksumsRequest { - return { pagination: undefined }; -} - -export const QueryChecksumsRequest = { - encode(message: QueryChecksumsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.pagination !== undefined) { - PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryChecksumsRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryChecksumsRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.pagination = PageRequest.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryChecksumsRequest { - return { pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined }; - }, - - toJSON(message: QueryChecksumsRequest): unknown { - const obj: any = {}; - if (message.pagination !== undefined) { - obj.pagination = PageRequest.toJSON(message.pagination); - } - return obj; - }, - - create(base?: DeepPartial): QueryChecksumsRequest { - return QueryChecksumsRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryChecksumsRequest { - const message = createBaseQueryChecksumsRequest(); - message.pagination = (object.pagination !== undefined && object.pagination !== null) - ? PageRequest.fromPartial(object.pagination) - : undefined; - return message; - }, -}; - -function createBaseQueryChecksumsResponse(): QueryChecksumsResponse { - return { checksums: [], pagination: undefined }; -} - -export const QueryChecksumsResponse = { - encode(message: QueryChecksumsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.checksums) { - writer.uint32(10).string(v!); - } - if (message.pagination !== undefined) { - PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryChecksumsResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryChecksumsResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.checksums.push(reader.string()); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.pagination = PageResponse.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryChecksumsResponse { - return { - checksums: globalThis.Array.isArray(object?.checksums) - ? object.checksums.map((e: any) => globalThis.String(e)) - : [], - pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, - }; - }, - - toJSON(message: QueryChecksumsResponse): unknown { - const obj: any = {}; - if (message.checksums?.length) { - obj.checksums = message.checksums; - } - if (message.pagination !== undefined) { - obj.pagination = PageResponse.toJSON(message.pagination); - } - return obj; - }, - - create(base?: DeepPartial): QueryChecksumsResponse { - return QueryChecksumsResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryChecksumsResponse { - const message = createBaseQueryChecksumsResponse(); - message.checksums = object.checksums?.map((e) => e) || []; - message.pagination = (object.pagination !== undefined && object.pagination !== null) - ? PageResponse.fromPartial(object.pagination) - : undefined; - return message; - }, -}; - -function createBaseQueryCodeRequest(): QueryCodeRequest { - return { checksum: "" }; -} - -export const QueryCodeRequest = { - encode(message: QueryCodeRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.checksum !== "") { - writer.uint32(10).string(message.checksum); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryCodeRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryCodeRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.checksum = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryCodeRequest { - return { checksum: isSet(object.checksum) ? globalThis.String(object.checksum) : "" }; - }, - - toJSON(message: QueryCodeRequest): unknown { - const obj: any = {}; - if (message.checksum !== "") { - obj.checksum = message.checksum; - } - return obj; - }, - - create(base?: DeepPartial): QueryCodeRequest { - return QueryCodeRequest.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryCodeRequest { - const message = createBaseQueryCodeRequest(); - message.checksum = object.checksum ?? ""; - return message; - }, -}; - -function createBaseQueryCodeResponse(): QueryCodeResponse { - return { data: new Uint8Array(0) }; -} - -export const QueryCodeResponse = { - encode(message: QueryCodeResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.data.length !== 0) { - writer.uint32(10).bytes(message.data); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): QueryCodeResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseQueryCodeResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.data = reader.bytes(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): QueryCodeResponse { - return { data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(0) }; - }, - - toJSON(message: QueryCodeResponse): unknown { - const obj: any = {}; - if (message.data.length !== 0) { - obj.data = base64FromBytes(message.data); - } - return obj; - }, - - create(base?: DeepPartial): QueryCodeResponse { - return QueryCodeResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): QueryCodeResponse { - const message = createBaseQueryCodeResponse(); - message.data = object.data ?? new Uint8Array(0); - return message; - }, -}; - -/** Query service for wasm module */ -export interface Query { - /** Get all Wasm checksums */ - Checksums(request: QueryChecksumsRequest): Promise; - /** Get Wasm code for given checksum */ - Code(request: QueryCodeRequest): Promise; -} - -export const QueryServiceName = "ibc.lightclients.wasm.v1.Query"; -export class QueryClientImpl implements Query { - private readonly rpc: Rpc; - private readonly service: string; - constructor(rpc: Rpc, opts?: { service?: string }) { - this.service = opts?.service || QueryServiceName; - this.rpc = rpc; - this.Checksums = this.Checksums.bind(this); - this.Code = this.Code.bind(this); - } - Checksums(request: QueryChecksumsRequest): Promise { - const data = QueryChecksumsRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, "Checksums", data); - return promise.then((data) => QueryChecksumsResponse.decode(_m0.Reader.create(data))); - } - - Code(request: QueryCodeRequest): Promise { - const data = QueryCodeRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, "Code", data); - return promise.then((data) => QueryCodeResponse.decode(_m0.Reader.create(data))); - } -} - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -function bytesFromBase64(b64: string): Uint8Array { - if ((globalThis as any).Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if ((globalThis as any).Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(globalThis.String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin ? T - : T extends globalThis.Array ? globalThis.Array> - : T extends ReadonlyArray ? ReadonlyArray> - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/protobuf/ibc/lightclients/wasm/v1/tx.ts b/src/protobuf/ibc/lightclients/wasm/v1/tx.ts deleted file mode 100644 index 205d693d..00000000 --- a/src/protobuf/ibc/lightclients/wasm/v1/tx.ts +++ /dev/null @@ -1,528 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 -// source: ibc/lightclients/wasm/v1/tx.proto - -/* eslint-disable */ -import * as _m0 from "protobufjs/minimal"; - -export const protobufPackage = "ibc.lightclients.wasm.v1"; - -/** MsgStoreCode defines the request type for the StoreCode rpc. */ -export interface MsgStoreCode { - /** signer address */ - signer: string; - /** wasm byte code of light client contract. It can be raw or gzip compressed */ - wasm_byte_code: Uint8Array; -} - -/** MsgStoreCodeResponse defines the response type for the StoreCode rpc */ -export interface MsgStoreCodeResponse { - /** checksum is the sha256 hash of the stored code */ - checksum: Uint8Array; -} - -/** MsgRemoveChecksum defines the request type for the MsgRemoveChecksum rpc. */ -export interface MsgRemoveChecksum { - /** signer address */ - signer: string; - /** checksum is the sha256 hash to be removed from the store */ - checksum: Uint8Array; -} - -/** MsgStoreChecksumResponse defines the response type for the StoreCode rpc */ -export interface MsgRemoveChecksumResponse { -} - -/** MsgMigrateContract defines the request type for the MigrateContract rpc. */ -export interface MsgMigrateContract { - /** signer address */ - signer: string; - /** the client id of the contract */ - client_id: string; - /** checksum is the sha256 hash of the new wasm byte code for the contract */ - checksum: Uint8Array; - /** the json encoded message to be passed to the contract on migration */ - msg: Uint8Array; -} - -/** MsgMigrateContractResponse defines the response type for the MigrateContract rpc */ -export interface MsgMigrateContractResponse { -} - -function createBaseMsgStoreCode(): MsgStoreCode { - return { signer: "", wasm_byte_code: new Uint8Array(0) }; -} - -export const MsgStoreCode = { - encode(message: MsgStoreCode, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.signer !== "") { - writer.uint32(10).string(message.signer); - } - if (message.wasm_byte_code.length !== 0) { - writer.uint32(18).bytes(message.wasm_byte_code); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgStoreCode { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgStoreCode(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.signer = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.wasm_byte_code = reader.bytes(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): MsgStoreCode { - return { - signer: isSet(object.signer) ? globalThis.String(object.signer) : "", - wasm_byte_code: isSet(object.wasm_byte_code) ? bytesFromBase64(object.wasm_byte_code) : new Uint8Array(0), - }; - }, - - toJSON(message: MsgStoreCode): unknown { - const obj: any = {}; - if (message.signer !== "") { - obj.signer = message.signer; - } - if (message.wasm_byte_code.length !== 0) { - obj.wasm_byte_code = base64FromBytes(message.wasm_byte_code); - } - return obj; - }, - - create(base?: DeepPartial): MsgStoreCode { - return MsgStoreCode.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): MsgStoreCode { - const message = createBaseMsgStoreCode(); - message.signer = object.signer ?? ""; - message.wasm_byte_code = object.wasm_byte_code ?? new Uint8Array(0); - return message; - }, -}; - -function createBaseMsgStoreCodeResponse(): MsgStoreCodeResponse { - return { checksum: new Uint8Array(0) }; -} - -export const MsgStoreCodeResponse = { - encode(message: MsgStoreCodeResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.checksum.length !== 0) { - writer.uint32(10).bytes(message.checksum); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgStoreCodeResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgStoreCodeResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.checksum = reader.bytes(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): MsgStoreCodeResponse { - return { checksum: isSet(object.checksum) ? bytesFromBase64(object.checksum) : new Uint8Array(0) }; - }, - - toJSON(message: MsgStoreCodeResponse): unknown { - const obj: any = {}; - if (message.checksum.length !== 0) { - obj.checksum = base64FromBytes(message.checksum); - } - return obj; - }, - - create(base?: DeepPartial): MsgStoreCodeResponse { - return MsgStoreCodeResponse.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): MsgStoreCodeResponse { - const message = createBaseMsgStoreCodeResponse(); - message.checksum = object.checksum ?? new Uint8Array(0); - return message; - }, -}; - -function createBaseMsgRemoveChecksum(): MsgRemoveChecksum { - return { signer: "", checksum: new Uint8Array(0) }; -} - -export const MsgRemoveChecksum = { - encode(message: MsgRemoveChecksum, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.signer !== "") { - writer.uint32(10).string(message.signer); - } - if (message.checksum.length !== 0) { - writer.uint32(18).bytes(message.checksum); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgRemoveChecksum { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgRemoveChecksum(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.signer = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.checksum = reader.bytes(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): MsgRemoveChecksum { - return { - signer: isSet(object.signer) ? globalThis.String(object.signer) : "", - checksum: isSet(object.checksum) ? bytesFromBase64(object.checksum) : new Uint8Array(0), - }; - }, - - toJSON(message: MsgRemoveChecksum): unknown { - const obj: any = {}; - if (message.signer !== "") { - obj.signer = message.signer; - } - if (message.checksum.length !== 0) { - obj.checksum = base64FromBytes(message.checksum); - } - return obj; - }, - - create(base?: DeepPartial): MsgRemoveChecksum { - return MsgRemoveChecksum.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): MsgRemoveChecksum { - const message = createBaseMsgRemoveChecksum(); - message.signer = object.signer ?? ""; - message.checksum = object.checksum ?? new Uint8Array(0); - return message; - }, -}; - -function createBaseMsgRemoveChecksumResponse(): MsgRemoveChecksumResponse { - return {}; -} - -export const MsgRemoveChecksumResponse = { - encode(_: MsgRemoveChecksumResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgRemoveChecksumResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgRemoveChecksumResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(_: any): MsgRemoveChecksumResponse { - return {}; - }, - - toJSON(_: MsgRemoveChecksumResponse): unknown { - const obj: any = {}; - return obj; - }, - - create(base?: DeepPartial): MsgRemoveChecksumResponse { - return MsgRemoveChecksumResponse.fromPartial(base ?? {}); - }, - fromPartial(_: DeepPartial): MsgRemoveChecksumResponse { - const message = createBaseMsgRemoveChecksumResponse(); - return message; - }, -}; - -function createBaseMsgMigrateContract(): MsgMigrateContract { - return { signer: "", client_id: "", checksum: new Uint8Array(0), msg: new Uint8Array(0) }; -} - -export const MsgMigrateContract = { - encode(message: MsgMigrateContract, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.signer !== "") { - writer.uint32(10).string(message.signer); - } - if (message.client_id !== "") { - writer.uint32(18).string(message.client_id); - } - if (message.checksum.length !== 0) { - writer.uint32(26).bytes(message.checksum); - } - if (message.msg.length !== 0) { - writer.uint32(34).bytes(message.msg); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgMigrateContract { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgMigrateContract(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.signer = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.client_id = reader.string(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.checksum = reader.bytes(); - continue; - case 4: - if (tag !== 34) { - break; - } - - message.msg = reader.bytes(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): MsgMigrateContract { - return { - signer: isSet(object.signer) ? globalThis.String(object.signer) : "", - client_id: isSet(object.client_id) ? globalThis.String(object.client_id) : "", - checksum: isSet(object.checksum) ? bytesFromBase64(object.checksum) : new Uint8Array(0), - msg: isSet(object.msg) ? bytesFromBase64(object.msg) : new Uint8Array(0), - }; - }, - - toJSON(message: MsgMigrateContract): unknown { - const obj: any = {}; - if (message.signer !== "") { - obj.signer = message.signer; - } - if (message.client_id !== "") { - obj.client_id = message.client_id; - } - if (message.checksum.length !== 0) { - obj.checksum = base64FromBytes(message.checksum); - } - if (message.msg.length !== 0) { - obj.msg = base64FromBytes(message.msg); - } - return obj; - }, - - create(base?: DeepPartial): MsgMigrateContract { - return MsgMigrateContract.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): MsgMigrateContract { - const message = createBaseMsgMigrateContract(); - message.signer = object.signer ?? ""; - message.client_id = object.client_id ?? ""; - message.checksum = object.checksum ?? new Uint8Array(0); - message.msg = object.msg ?? new Uint8Array(0); - return message; - }, -}; - -function createBaseMsgMigrateContractResponse(): MsgMigrateContractResponse { - return {}; -} - -export const MsgMigrateContractResponse = { - encode(_: MsgMigrateContractResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): MsgMigrateContractResponse { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMsgMigrateContractResponse(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(_: any): MsgMigrateContractResponse { - return {}; - }, - - toJSON(_: MsgMigrateContractResponse): unknown { - const obj: any = {}; - return obj; - }, - - create(base?: DeepPartial): MsgMigrateContractResponse { - return MsgMigrateContractResponse.fromPartial(base ?? {}); - }, - fromPartial(_: DeepPartial): MsgMigrateContractResponse { - const message = createBaseMsgMigrateContractResponse(); - return message; - }, -}; - -/** Msg defines the ibc/08-wasm Msg service. */ -export interface Msg { - /** StoreCode defines a rpc handler method for MsgStoreCode. */ - StoreCode(request: MsgStoreCode): Promise; - /** RemoveChecksum defines a rpc handler method for MsgRemoveChecksum. */ - RemoveChecksum(request: MsgRemoveChecksum): Promise; - /** MigrateContract defines a rpc handler method for MsgMigrateContract. */ - MigrateContract(request: MsgMigrateContract): Promise; -} - -export const MsgServiceName = "ibc.lightclients.wasm.v1.Msg"; -export class MsgClientImpl implements Msg { - private readonly rpc: Rpc; - private readonly service: string; - constructor(rpc: Rpc, opts?: { service?: string }) { - this.service = opts?.service || MsgServiceName; - this.rpc = rpc; - this.StoreCode = this.StoreCode.bind(this); - this.RemoveChecksum = this.RemoveChecksum.bind(this); - this.MigrateContract = this.MigrateContract.bind(this); - } - StoreCode(request: MsgStoreCode): Promise { - const data = MsgStoreCode.encode(request).finish(); - const promise = this.rpc.request(this.service, "StoreCode", data); - return promise.then((data) => MsgStoreCodeResponse.decode(_m0.Reader.create(data))); - } - - RemoveChecksum(request: MsgRemoveChecksum): Promise { - const data = MsgRemoveChecksum.encode(request).finish(); - const promise = this.rpc.request(this.service, "RemoveChecksum", data); - return promise.then((data) => MsgRemoveChecksumResponse.decode(_m0.Reader.create(data))); - } - - MigrateContract(request: MsgMigrateContract): Promise { - const data = MsgMigrateContract.encode(request).finish(); - const promise = this.rpc.request(this.service, "MigrateContract", data); - return promise.then((data) => MsgMigrateContractResponse.decode(_m0.Reader.create(data))); - } -} - -interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; -} - -function bytesFromBase64(b64: string): Uint8Array { - if ((globalThis as any).Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if ((globalThis as any).Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(globalThis.String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin ? T - : T extends globalThis.Array ? globalThis.Array> - : T extends ReadonlyArray ? ReadonlyArray> - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/protobuf/ibc/lightclients/wasm/v1/wasm.ts b/src/protobuf/ibc/lightclients/wasm/v1/wasm.ts deleted file mode 100644 index 75ee68f0..00000000 --- a/src/protobuf/ibc/lightclients/wasm/v1/wasm.ts +++ /dev/null @@ -1,351 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 -// source: ibc/lightclients/wasm/v1/wasm.proto - -/* eslint-disable */ -import * as _m0 from "protobufjs/minimal"; -import { Height } from "../../../core/client/v1/client"; - -export const protobufPackage = "ibc.lightclients.wasm.v1"; - -/** Wasm light client's Client state */ -export interface ClientState { - /** - * bytes encoding the client state of the underlying light client - * implemented as a Wasm contract. - */ - data: Uint8Array; - checksum: Uint8Array; - latest_height?: Height | undefined; -} - -/** Wasm light client's ConsensusState */ -export interface ConsensusState { - /** - * bytes encoding the consensus state of the underlying light client - * implemented as a Wasm contract. - */ - data: Uint8Array; -} - -/** Wasm light client message (either header(s) or misbehaviour) */ -export interface ClientMessage { - data: Uint8Array; -} - -/** - * Checksums defines a list of all checksums that are stored - * - * Deprecated: This message is deprecated in favor of storing the checksums - * using a Collections.KeySet. - * - * @deprecated - */ -export interface Checksums { - checksums: Uint8Array[]; -} - -function createBaseClientState(): ClientState { - return { data: new Uint8Array(0), checksum: new Uint8Array(0), latest_height: undefined }; -} - -export const ClientState = { - encode(message: ClientState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.data.length !== 0) { - writer.uint32(10).bytes(message.data); - } - if (message.checksum.length !== 0) { - writer.uint32(18).bytes(message.checksum); - } - if (message.latest_height !== undefined) { - Height.encode(message.latest_height, writer.uint32(26).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): ClientState { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseClientState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.data = reader.bytes(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.checksum = reader.bytes(); - continue; - case 3: - if (tag !== 26) { - break; - } - - message.latest_height = Height.decode(reader, reader.uint32()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): ClientState { - return { - data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(0), - checksum: isSet(object.checksum) ? bytesFromBase64(object.checksum) : new Uint8Array(0), - latest_height: isSet(object.latest_height) ? Height.fromJSON(object.latest_height) : undefined, - }; - }, - - toJSON(message: ClientState): unknown { - const obj: any = {}; - if (message.data.length !== 0) { - obj.data = base64FromBytes(message.data); - } - if (message.checksum.length !== 0) { - obj.checksum = base64FromBytes(message.checksum); - } - if (message.latest_height !== undefined) { - obj.latest_height = Height.toJSON(message.latest_height); - } - return obj; - }, - - create(base?: DeepPartial): ClientState { - return ClientState.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): ClientState { - const message = createBaseClientState(); - message.data = object.data ?? new Uint8Array(0); - message.checksum = object.checksum ?? new Uint8Array(0); - message.latest_height = (object.latest_height !== undefined && object.latest_height !== null) - ? Height.fromPartial(object.latest_height) - : undefined; - return message; - }, -}; - -function createBaseConsensusState(): ConsensusState { - return { data: new Uint8Array(0) }; -} - -export const ConsensusState = { - encode(message: ConsensusState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.data.length !== 0) { - writer.uint32(10).bytes(message.data); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): ConsensusState { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseConsensusState(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.data = reader.bytes(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): ConsensusState { - return { data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(0) }; - }, - - toJSON(message: ConsensusState): unknown { - const obj: any = {}; - if (message.data.length !== 0) { - obj.data = base64FromBytes(message.data); - } - return obj; - }, - - create(base?: DeepPartial): ConsensusState { - return ConsensusState.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): ConsensusState { - const message = createBaseConsensusState(); - message.data = object.data ?? new Uint8Array(0); - return message; - }, -}; - -function createBaseClientMessage(): ClientMessage { - return { data: new Uint8Array(0) }; -} - -export const ClientMessage = { - encode(message: ClientMessage, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.data.length !== 0) { - writer.uint32(10).bytes(message.data); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): ClientMessage { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseClientMessage(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.data = reader.bytes(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): ClientMessage { - return { data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(0) }; - }, - - toJSON(message: ClientMessage): unknown { - const obj: any = {}; - if (message.data.length !== 0) { - obj.data = base64FromBytes(message.data); - } - return obj; - }, - - create(base?: DeepPartial): ClientMessage { - return ClientMessage.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): ClientMessage { - const message = createBaseClientMessage(); - message.data = object.data ?? new Uint8Array(0); - return message; - }, -}; - -function createBaseChecksums(): Checksums { - return { checksums: [] }; -} - -export const Checksums = { - encode(message: Checksums, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - for (const v of message.checksums) { - writer.uint32(10).bytes(v!); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Checksums { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseChecksums(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.checksums.push(reader.bytes()); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): Checksums { - return { - checksums: globalThis.Array.isArray(object?.checksums) - ? object.checksums.map((e: any) => bytesFromBase64(e)) - : [], - }; - }, - - toJSON(message: Checksums): unknown { - const obj: any = {}; - if (message.checksums?.length) { - obj.checksums = message.checksums.map((e) => base64FromBytes(e)); - } - return obj; - }, - - create(base?: DeepPartial): Checksums { - return Checksums.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): Checksums { - const message = createBaseChecksums(); - message.checksums = object.checksums?.map((e) => e) || []; - return message; - }, -}; - -function bytesFromBase64(b64: string): Uint8Array { - if ((globalThis as any).Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); - } else { - const bin = globalThis.atob(b64); - const arr = new Uint8Array(bin.length); - for (let i = 0; i < bin.length; ++i) { - arr[i] = bin.charCodeAt(i); - } - return arr; - } -} - -function base64FromBytes(arr: Uint8Array): string { - if ((globalThis as any).Buffer) { - return globalThis.Buffer.from(arr).toString("base64"); - } else { - const bin: string[] = []; - arr.forEach((byte) => { - bin.push(globalThis.String.fromCharCode(byte)); - }); - return globalThis.btoa(bin.join("")); - } -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin ? T - : T extends globalThis.Array ? globalThis.Array> - : T extends ReadonlyArray ? ReadonlyArray> - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/src/protobuf/secret/compute/v1beta1/genesis.ts b/src/protobuf/secret/compute/v1beta1/genesis.ts index 9cf60597..b9c2f2e2 100644 --- a/src/protobuf/secret/compute/v1beta1/genesis.ts +++ b/src/protobuf/secret/compute/v1beta1/genesis.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: secret/compute/v1beta1/genesis.proto /* eslint-disable */ diff --git a/src/protobuf/secret/compute/v1beta1/msg.ts b/src/protobuf/secret/compute/v1beta1/msg.ts index f0ca960f..d577d6da 100644 --- a/src/protobuf/secret/compute/v1beta1/msg.ts +++ b/src/protobuf/secret/compute/v1beta1/msg.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: secret/compute/v1beta1/msg.proto /* eslint-disable */ diff --git a/src/protobuf/secret/compute/v1beta1/query.ts b/src/protobuf/secret/compute/v1beta1/query.ts index 0612eadb..8cce6f85 100644 --- a/src/protobuf/secret/compute/v1beta1/query.ts +++ b/src/protobuf/secret/compute/v1beta1/query.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: secret/compute/v1beta1/query.proto /* eslint-disable */ diff --git a/src/protobuf/secret/compute/v1beta1/types.ts b/src/protobuf/secret/compute/v1beta1/types.ts index e2bce260..3a4a65a9 100644 --- a/src/protobuf/secret/compute/v1beta1/types.ts +++ b/src/protobuf/secret/compute/v1beta1/types.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: secret/compute/v1beta1/types.proto /* eslint-disable */ diff --git a/src/protobuf/secret/emergencybutton/v1beta1/genesis.ts b/src/protobuf/secret/emergencybutton/v1beta1/genesis.ts index a3ac35a2..74be644c 100644 --- a/src/protobuf/secret/emergencybutton/v1beta1/genesis.ts +++ b/src/protobuf/secret/emergencybutton/v1beta1/genesis.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: secret/emergencybutton/v1beta1/genesis.proto /* eslint-disable */ diff --git a/src/protobuf/secret/emergencybutton/v1beta1/params.ts b/src/protobuf/secret/emergencybutton/v1beta1/params.ts index 98b3978b..80e200a3 100644 --- a/src/protobuf/secret/emergencybutton/v1beta1/params.ts +++ b/src/protobuf/secret/emergencybutton/v1beta1/params.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: secret/emergencybutton/v1beta1/params.proto /* eslint-disable */ diff --git a/src/protobuf/secret/emergencybutton/v1beta1/query.ts b/src/protobuf/secret/emergencybutton/v1beta1/query.ts index 48b592d9..6db5c906 100644 --- a/src/protobuf/secret/emergencybutton/v1beta1/query.ts +++ b/src/protobuf/secret/emergencybutton/v1beta1/query.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: secret/emergencybutton/v1beta1/query.proto /* eslint-disable */ diff --git a/src/protobuf/secret/emergencybutton/v1beta1/tx.ts b/src/protobuf/secret/emergencybutton/v1beta1/tx.ts index 09f971c5..9ecb25a0 100644 --- a/src/protobuf/secret/emergencybutton/v1beta1/tx.ts +++ b/src/protobuf/secret/emergencybutton/v1beta1/tx.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: secret/emergencybutton/v1beta1/tx.proto /* eslint-disable */ diff --git a/src/protobuf/secret/registration/remote_attestation/v1beta1/types.ts b/src/protobuf/secret/registration/remote_attestation/v1beta1/types.ts index bd46971a..5d4d258a 100644 --- a/src/protobuf/secret/registration/remote_attestation/v1beta1/types.ts +++ b/src/protobuf/secret/registration/remote_attestation/v1beta1/types.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: secret/registration/remote_attestation/v1beta1/types.proto /* eslint-disable */ diff --git a/src/protobuf/secret/registration/v1beta1/genesis.ts b/src/protobuf/secret/registration/v1beta1/genesis.ts index 6bd7255f..dee1bdb8 100644 --- a/src/protobuf/secret/registration/v1beta1/genesis.ts +++ b/src/protobuf/secret/registration/v1beta1/genesis.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: secret/registration/v1beta1/genesis.proto /* eslint-disable */ diff --git a/src/protobuf/secret/registration/v1beta1/msg.ts b/src/protobuf/secret/registration/v1beta1/msg.ts index 15039e9a..fcbf6ac2 100644 --- a/src/protobuf/secret/registration/v1beta1/msg.ts +++ b/src/protobuf/secret/registration/v1beta1/msg.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: secret/registration/v1beta1/msg.proto /* eslint-disable */ diff --git a/src/protobuf/secret/registration/v1beta1/query.ts b/src/protobuf/secret/registration/v1beta1/query.ts index f475c089..26397842 100644 --- a/src/protobuf/secret/registration/v1beta1/query.ts +++ b/src/protobuf/secret/registration/v1beta1/query.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: secret/registration/v1beta1/query.proto /* eslint-disable */ diff --git a/src/protobuf/secret/registration/v1beta1/types.ts b/src/protobuf/secret/registration/v1beta1/types.ts index 5e19db0d..c96b3bcd 100644 --- a/src/protobuf/secret/registration/v1beta1/types.ts +++ b/src/protobuf/secret/registration/v1beta1/types.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: secret/registration/v1beta1/types.proto /* eslint-disable */ diff --git a/src/protobuf/tendermint/abci/types.ts b/src/protobuf/tendermint/abci/types.ts index 67c3f206..b833d0ce 100644 --- a/src/protobuf/tendermint/abci/types.ts +++ b/src/protobuf/tendermint/abci/types.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: tendermint/abci/types.proto /* eslint-disable */ diff --git a/src/protobuf/tendermint/blocksync/types.ts b/src/protobuf/tendermint/blocksync/types.ts index bbda0787..bad39e98 100644 --- a/src/protobuf/tendermint/blocksync/types.ts +++ b/src/protobuf/tendermint/blocksync/types.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: tendermint/blocksync/types.proto /* eslint-disable */ diff --git a/src/protobuf/tendermint/consensus/types.ts b/src/protobuf/tendermint/consensus/types.ts index 0e6c236b..292c6e78 100644 --- a/src/protobuf/tendermint/consensus/types.ts +++ b/src/protobuf/tendermint/consensus/types.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: tendermint/consensus/types.proto /* eslint-disable */ diff --git a/src/protobuf/tendermint/consensus/wal.ts b/src/protobuf/tendermint/consensus/wal.ts index 2d24f64c..5ecb74ef 100644 --- a/src/protobuf/tendermint/consensus/wal.ts +++ b/src/protobuf/tendermint/consensus/wal.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: tendermint/consensus/wal.proto /* eslint-disable */ diff --git a/src/protobuf/tendermint/crypto/keys.ts b/src/protobuf/tendermint/crypto/keys.ts index 327dcfe6..16b1c650 100644 --- a/src/protobuf/tendermint/crypto/keys.ts +++ b/src/protobuf/tendermint/crypto/keys.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: tendermint/crypto/keys.proto /* eslint-disable */ diff --git a/src/protobuf/tendermint/crypto/proof.ts b/src/protobuf/tendermint/crypto/proof.ts index 580b43f6..25664dea 100644 --- a/src/protobuf/tendermint/crypto/proof.ts +++ b/src/protobuf/tendermint/crypto/proof.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: tendermint/crypto/proof.proto /* eslint-disable */ diff --git a/src/protobuf/tendermint/libs/bits/types.ts b/src/protobuf/tendermint/libs/bits/types.ts index 901ed182..773cbacb 100644 --- a/src/protobuf/tendermint/libs/bits/types.ts +++ b/src/protobuf/tendermint/libs/bits/types.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: tendermint/libs/bits/types.proto /* eslint-disable */ diff --git a/src/protobuf/tendermint/mempool/types.ts b/src/protobuf/tendermint/mempool/types.ts index 2aa3b0e3..d6e08512 100644 --- a/src/protobuf/tendermint/mempool/types.ts +++ b/src/protobuf/tendermint/mempool/types.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: tendermint/mempool/types.proto /* eslint-disable */ diff --git a/src/protobuf/tendermint/p2p/conn.ts b/src/protobuf/tendermint/p2p/conn.ts index 695cb24e..f110dc55 100644 --- a/src/protobuf/tendermint/p2p/conn.ts +++ b/src/protobuf/tendermint/p2p/conn.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: tendermint/p2p/conn.proto /* eslint-disable */ diff --git a/src/protobuf/tendermint/p2p/pex.ts b/src/protobuf/tendermint/p2p/pex.ts index 5dbc59bf..7fc1003b 100644 --- a/src/protobuf/tendermint/p2p/pex.ts +++ b/src/protobuf/tendermint/p2p/pex.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: tendermint/p2p/pex.proto /* eslint-disable */ diff --git a/src/protobuf/tendermint/p2p/types.ts b/src/protobuf/tendermint/p2p/types.ts index a7ba6fe1..b060c45b 100644 --- a/src/protobuf/tendermint/p2p/types.ts +++ b/src/protobuf/tendermint/p2p/types.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: tendermint/p2p/types.proto /* eslint-disable */ diff --git a/src/protobuf/tendermint/privval/types.ts b/src/protobuf/tendermint/privval/types.ts index cb719813..0c7366b2 100644 --- a/src/protobuf/tendermint/privval/types.ts +++ b/src/protobuf/tendermint/privval/types.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: tendermint/privval/types.proto /* eslint-disable */ diff --git a/src/protobuf/tendermint/rpc/grpc/types.ts b/src/protobuf/tendermint/rpc/grpc/types.ts index 5f71bed5..84d6c45f 100644 --- a/src/protobuf/tendermint/rpc/grpc/types.ts +++ b/src/protobuf/tendermint/rpc/grpc/types.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: tendermint/rpc/grpc/types.proto /* eslint-disable */ diff --git a/src/protobuf/tendermint/state/types.ts b/src/protobuf/tendermint/state/types.ts index 0baa99fe..fd017131 100644 --- a/src/protobuf/tendermint/state/types.ts +++ b/src/protobuf/tendermint/state/types.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: tendermint/state/types.proto /* eslint-disable */ diff --git a/src/protobuf/tendermint/statesync/types.ts b/src/protobuf/tendermint/statesync/types.ts index 3fa39e5e..f4c2a01c 100644 --- a/src/protobuf/tendermint/statesync/types.ts +++ b/src/protobuf/tendermint/statesync/types.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: tendermint/statesync/types.proto /* eslint-disable */ diff --git a/src/protobuf/tendermint/store/types.ts b/src/protobuf/tendermint/store/types.ts index e0efda88..660f257e 100644 --- a/src/protobuf/tendermint/store/types.ts +++ b/src/protobuf/tendermint/store/types.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: tendermint/store/types.proto /* eslint-disable */ diff --git a/src/protobuf/tendermint/types/block.ts b/src/protobuf/tendermint/types/block.ts index 5752b53a..16fa563c 100644 --- a/src/protobuf/tendermint/types/block.ts +++ b/src/protobuf/tendermint/types/block.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: tendermint/types/block.proto /* eslint-disable */ diff --git a/src/protobuf/tendermint/types/canonical.ts b/src/protobuf/tendermint/types/canonical.ts index 5d644f1e..03f23195 100644 --- a/src/protobuf/tendermint/types/canonical.ts +++ b/src/protobuf/tendermint/types/canonical.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: tendermint/types/canonical.proto /* eslint-disable */ diff --git a/src/protobuf/tendermint/types/events.ts b/src/protobuf/tendermint/types/events.ts index cd06d43f..84af6322 100644 --- a/src/protobuf/tendermint/types/events.ts +++ b/src/protobuf/tendermint/types/events.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: tendermint/types/events.proto /* eslint-disable */ diff --git a/src/protobuf/tendermint/types/evidence.ts b/src/protobuf/tendermint/types/evidence.ts index 59c60136..e9d84146 100644 --- a/src/protobuf/tendermint/types/evidence.ts +++ b/src/protobuf/tendermint/types/evidence.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: tendermint/types/evidence.proto /* eslint-disable */ diff --git a/src/protobuf/tendermint/types/params.ts b/src/protobuf/tendermint/types/params.ts index 1a27dab4..d5a24b2a 100644 --- a/src/protobuf/tendermint/types/params.ts +++ b/src/protobuf/tendermint/types/params.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: tendermint/types/params.proto /* eslint-disable */ diff --git a/src/protobuf/tendermint/types/types.ts b/src/protobuf/tendermint/types/types.ts index 495432d3..dcc02b37 100644 --- a/src/protobuf/tendermint/types/types.ts +++ b/src/protobuf/tendermint/types/types.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: tendermint/types/types.proto /* eslint-disable */ diff --git a/src/protobuf/tendermint/types/validator.ts b/src/protobuf/tendermint/types/validator.ts index 9c2949fc..79810685 100644 --- a/src/protobuf/tendermint/types/validator.ts +++ b/src/protobuf/tendermint/types/validator.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: tendermint/types/validator.proto /* eslint-disable */ diff --git a/src/protobuf/tendermint/version/types.ts b/src/protobuf/tendermint/version/types.ts index a6a46e4b..6eee8d13 100644 --- a/src/protobuf/tendermint/version/types.ts +++ b/src/protobuf/tendermint/version/types.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v1.178.0 -// protoc v5.28.1 +// protoc v3.21.3 // source: tendermint/version/types.proto /* eslint-disable */ diff --git a/src/query/circuit.ts b/src/query/circuit.ts deleted file mode 100644 index 9e4aca2e..00000000 --- a/src/query/circuit.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { - Query, - QueryAccountRequest, - AccountResponse, - QueryAccountsRequest, - AccountsResponse, - QueryDisabledListRequest, - DisabledListResponse, -} from "../grpc_gateway/cosmos/circuit/v1/query.pb"; - -export class CircuitQuerier { - constructor(private url: string) {} - - account( - req: QueryAccountRequest, - headers?: HeadersInit, - ): Promise { - return Query.Account(req, { - headers, - pathPrefix: this.url, - }); - } - - accounts( - req: QueryAccountsRequest, - headers?: HeadersInit, - ): Promise { - return Query.Accounts(req, { - headers, - pathPrefix: this.url, - }); - } - - disabledList( - req: QueryDisabledListRequest, - headers?: HeadersInit, - ): Promise { - return Query.DisabledList(req, { - headers, - pathPrefix: this.url, - }); - } -} diff --git a/src/query/group.ts b/src/query/group.ts deleted file mode 100644 index de84192e..00000000 --- a/src/query/group.ts +++ /dev/null @@ -1,175 +0,0 @@ -import { - Query, - QueryGroupInfoRequest, - QueryGroupInfoResponse, - QueryGroupPolicyInfoRequest, - QueryGroupPolicyInfoResponse, - QueryGroupMembersRequest, - QueryGroupMembersResponse, - QueryGroupsByAdminRequest, - QueryGroupsByAdminResponse, - QueryGroupPoliciesByGroupRequest, - QueryGroupPoliciesByGroupResponse, - QueryGroupPoliciesByAdminRequest, - QueryGroupPoliciesByAdminResponse, - QueryProposalRequest, - QueryProposalResponse, - QueryProposalsByGroupPolicyRequest, - QueryProposalsByGroupPolicyResponse, - QueryVoteByProposalVoterRequest, - QueryVoteByProposalVoterResponse, - QueryVotesByProposalRequest, - QueryVotesByProposalResponse, - QueryVotesByVoterRequest, - QueryVotesByVoterResponse, - QueryGroupsByMemberRequest, - QueryGroupsByMemberResponse, - QueryTallyResultRequest, - QueryTallyResultResponse, - QueryGroupsRequest, - QueryGroupsResponse, -} from "../grpc_gateway/cosmos/group/v1/query.pb"; - -export class GroupQuerier { - constructor(private url: string) {} - - groupInfo( - req: QueryGroupInfoRequest, - headers?: HeadersInit, - ): Promise { - return Query.GroupInfo(req, { - headers, - pathPrefix: this.url, - }); - } - - groupPolicyInfo( - req: QueryGroupPolicyInfoRequest, - headers?: HeadersInit, - ): Promise { - return Query.GroupPolicyInfo(req, { - headers, - pathPrefix: this.url, - }); - } - - groupMembers( - req: QueryGroupMembersRequest, - headers?: HeadersInit, - ): Promise { - return Query.GroupMembers(req, { - headers, - pathPrefix: this.url, - }); - } - - groupsByAdmin( - req: QueryGroupsByAdminRequest, - headers?: HeadersInit, - ): Promise { - return Query.GroupsByAdmin(req, { - headers, - pathPrefix: this.url, - }); - } - - groupPoliciesByGroup( - req: QueryGroupPoliciesByGroupRequest, - headers?: HeadersInit, - ): Promise { - return Query.GroupPoliciesByGroup(req, { - headers, - pathPrefix: this.url, - }); - } - - groupPoliciesByAdmin( - req: QueryGroupPoliciesByAdminRequest, - headers?: HeadersInit, - ): Promise { - return Query.GroupPoliciesByAdmin(req, { - headers, - pathPrefix: this.url, - }); - } - - proposal( - req: QueryProposalRequest, - headers?: HeadersInit, - ): Promise { - return Query.Proposal(req, { - headers, - pathPrefix: this.url, - }); - } - - proposalsByGroupPolicy( - req: QueryProposalsByGroupPolicyRequest, - headers?: HeadersInit, - ): Promise { - return Query.ProposalsByGroupPolicy(req, { - headers, - pathPrefix: this.url, - }); - } - - voteByProposalVoter( - req: QueryVoteByProposalVoterRequest, - headers?: HeadersInit, - ): Promise { - return Query.VoteByProposalVoter(req, { - headers, - pathPrefix: this.url, - }); - } - - votesByProposal( - req: QueryVotesByProposalRequest, - headers?: HeadersInit, - ): Promise { - return Query.VotesByProposal(req, { - headers, - pathPrefix: this.url, - }); - } - - votesByVoter( - req: QueryVotesByVoterRequest, - headers?: HeadersInit, - ): Promise { - return Query.VotesByVoter(req, { - headers, - pathPrefix: this.url, - }); - } - - groupsByMember( - req: QueryGroupsByMemberRequest, - headers?: HeadersInit, - ): Promise { - return Query.GroupsByMember(req, { - headers, - pathPrefix: this.url, - }); - } - - tallyResult( - req: QueryTallyResultRequest, - headers?: HeadersInit, - ): Promise { - return Query.TallyResult(req, { - headers, - pathPrefix: this.url, - }); - } - - groups( - req: QueryGroupsRequest, - headers?: HeadersInit, - ): Promise { - return Query.Groups(req, { - headers, - pathPrefix: this.url, - }); - } -} diff --git a/src/query/ibc_wasm.ts b/src/query/ibc_wasm.ts deleted file mode 100644 index 67051fd9..00000000 --- a/src/query/ibc_wasm.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - Query, - QueryChecksumsRequest, - QueryChecksumsResponse, - QueryCodeRequest, - QueryCodeResponse, -} from "../grpc_gateway/ibc/lightclients/wasm/v1/query.pb"; - -export class IbcWasmQuerier { - constructor(private url: string) {} - - checksums( - req: QueryChecksumsRequest, - headers?: HeadersInit, - ): Promise { - return Query.Checksums(req, { - headers, - pathPrefix: this.url, - }); - } - - code( - req: QueryCodeRequest, - headers?: HeadersInit, - ): Promise { - return Query.Code(req, { - headers, - pathPrefix: this.url, - }); - } -} diff --git a/src/query/index.ts b/src/query/index.ts index 00e52b4c..94cc32d8 100644 --- a/src/query/index.ts +++ b/src/query/index.ts @@ -4,7 +4,6 @@ export * from "./auth"; export * from "./authz"; export * from "./autocli"; export * from "./bank"; -export * from "./circuit"; export * from "./compute"; export * from "./consensus"; export * from "./distribution"; @@ -13,7 +12,6 @@ export * from "./evidence"; export * from "./feegrant"; export * from "./gov_v1beta1"; export * from "./gov_v1"; -export * from "./group"; export * from "./ibc_channel"; export * from "./ibc_client"; export * from "./ibc_connection"; @@ -22,9 +20,7 @@ export * from "./ibc_interchain_accounts_controller"; export * from "./ibc_interchain_accounts_host"; export * from "./ibc_packet_forward"; export * from "./ibc_transfer"; -export * from "./ibc_wasm"; export * from "./mint"; -export * from "./nft"; export * from "./node"; export * from "./orm"; export * from "./params"; diff --git a/src/query/nft.ts b/src/query/nft.ts deleted file mode 100644 index 84a0b6f9..00000000 --- a/src/query/nft.ts +++ /dev/null @@ -1,88 +0,0 @@ -import { - Query, - QueryBalanceRequest, - QueryBalanceResponse, - QueryOwnerRequest, - QueryOwnerResponse, - QuerySupplyRequest, - QuerySupplyResponse, - QueryNFTsRequest, - QueryNFTsResponse, - QueryNFTRequest, - QueryNFTResponse, - QueryClassRequest, - QueryClassResponse, - QueryClassesRequest, - QueryClassesResponse, -} from "../grpc_gateway/cosmos/nft/v1beta1/query.pb"; - -export class NftQuerier { - constructor(private url: string) {} - - balance( - req: QueryBalanceRequest, - headers?: HeadersInit, - ): Promise { - return Query.Balance(req, { - headers, - pathPrefix: this.url, - }); - } - - owner( - req: QueryOwnerRequest, - headers?: HeadersInit, - ): Promise { - return Query.Owner(req, { - headers, - pathPrefix: this.url, - }); - } - - supply( - req: QuerySupplyRequest, - headers?: HeadersInit, - ): Promise { - return Query.Supply(req, { - headers, - pathPrefix: this.url, - }); - } - - nFTs( - req: QueryNFTsRequest, - headers?: HeadersInit, - ): Promise { - return Query.NFTs(req, { - headers, - pathPrefix: this.url, - }); - } - - nFT(req: QueryNFTRequest, headers?: HeadersInit): Promise { - return Query.NFT(req, { - headers, - pathPrefix: this.url, - }); - } - - class( - req: QueryClassRequest, - headers?: HeadersInit, - ): Promise { - return Query.Class(req, { - headers, - pathPrefix: this.url, - }); - } - - classes( - req: QueryClassesRequest, - headers?: HeadersInit, - ): Promise { - return Query.Classes(req, { - headers, - pathPrefix: this.url, - }); - } -} diff --git a/src/query/tendermint.ts b/src/query/tendermint.ts index 3e755d4a..b200f371 100644 --- a/src/query/tendermint.ts +++ b/src/query/tendermint.ts @@ -19,7 +19,7 @@ import { export class TendermintQuerier { constructor(private url: string) {} - abciQuery( + aBCIQuery( req: ABCIQueryRequest, headers?: HeadersInit, ): Promise {